## 1. Project Overview & Quickstart (comet-ml/README)

# Technical Documentation: comet-ml/README

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/comet-ml/README)

# README

### Agent Skills & Rules
- Discovered 21 agent rule(s) and prompt configurations.



--- METRICS ---
- Files Extracted: 1
- Estimated Token Budget: ~24 tokens
- Canonical Reference: https://codewiki.google/github.com/comet-ml/README


## 2. Official Technical Reference & Guides (comet-ml/comet-ml.github.io)

## File: docs/math.md

## Functions

<dl>
<dt>[add(a, b)](#add)</dt>
<dd>Calculates the sum of two variables.
</dd>
<dt>[abs(a)](#abs)</dt>
<dd>Calculates the absolute value of a number.
</dd>
<dt>[sum(array)](#sum)</dt>
<dd>Calculates the sum of an array.
</dd>
<dt>[sort(x)](#sort)</dt>
<dd>Sorts an array of values.
</dd>
<dt>[scientificNotation(number)](#scientificNotation)</dt>
<dd>Returns a number in exponential format.
</dd>
<dt>[round(x, n)](#round)</dt>
<dd>Rounds a number to n decimal places.
</dd>
<dt>[min(x)](#min)</dt>
<dd>Finds the minimum of an array
</dd>
<dt>[max(x)](#max)</dt>
<dd>Finds the maximum of an array
</dd>
<dt>[range(start, stop, step)](#range)</dt>
<dd>Creates an array of values in given range
</dd>
<dt>[avg(x)](#avg)</dt>
<dd>Finds the average (mean) of an array
</dd>
<dt>[transpose(matrix)](#transpose)</dt>
<dd>Computes the transpose of a matrix
</dd>
<dt>[deviation(x)](#deviation)</dt>
<dd>Finds the deviation of an array
</dd>
<dt>[variance(x, bias)](#variance)</dt>
<dd>Calculates the variance of an array
</dd>
<dt>[standardDeviation(x, bias)](#standardDeviation)</dt>
<dd>Calculates the standard deviation of an array
</dd>
<dt>[standardize(x)](#standardize)</dt>
<dd>Calculates the standardize of an array
</dd>
<dt>[rank(x)](#rank)</dt>
<dd>Calculates the rank of an array
</dd>
<dt>[pearson(x, y)](#pearson)</dt>
<dd>Calculates the Pearson correlation coefficient for two variables.
</dd>
<dt>[spearman(x, y)](#spearman)</dt>
<dd>Calculates the Spearman correlation coefficient for two variables.
</dd>
<dt>[euclideanDistance(x, y)](#euclideanDistance)</dt>
<dd>Calculates the Euclidean distance of an array
</dd>
<dt>[manhattanDistance(x, y)](#manhattanDistance)</dt>
<dd>Calculates the Manhattan (city) distance of an array
</dd>
<dt>[pairwiseDistance(x, distanceMetric)](#pairwiseDistance)</dt>
<dd>Calculates the pairwise distance of an array
</dd>
<dt>[hierarchicalClustering(pairwiseDistances, linkage)](#hierarchicalClustering)</dt>
<dd>Computes a hierarchical clustering of a matrix
</dd>
</dl>

<a name="add"></a>

## add(a, b)
Calculates the sum of two variables.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| a | `number` | number |
| b | `number` | number |

<a name="abs"></a>

## abs(a)
Calculates the absolute value of a number.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| a | `number` | number |

<a name="sum"></a>

## sum(array)
Calculates the sum of an array.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| array | `number` | Array of numbers. |

<a name="sort"></a>

## sort(x)
Sorts an array of values.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="scientificNotation"></a>

## scientificNotation(number)
Returns a number in exponential format.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| number | `number` | the number to format |

**Example**  
```js
> scientificNotation(0.00002)
"2.0000e-5"
```
<a name="round"></a>

## round(x, n)
Rounds a number to n decimal places.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Number to round. |
| n | `number` | Number of decimal places. |

<a name="min"></a>

## min(x)
Finds the minimum of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="max"></a>

## max(x)
Finds the maximum of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="range"></a>

## range(start, stop, step)
Creates an array of values in given range

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| start | `number` | Start value. |
| stop | `number` | Stop value. |
| step | `number` | Step value. |

<a name="avg"></a>

## avg(x)
Finds the average (mean) of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="transpose"></a>

## transpose(matrix)
Computes the transpose of a matrix

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| matrix | `Array` | the matrix to transpose |

<a name="deviation"></a>

## deviation(x)
Finds the deviation of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="variance"></a>

## variance(x, bias)
Calculates the variance of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| bias | `boolean` | If true, the biased sample variance is used. |

<a name="standardDeviation"></a>

## standardDeviation(x, bias)
Calculates the standard deviation of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| bias | `boolean` | If true, the biased sample variance is used. |

<a name="standardize"></a>

## standardize(x)
Calculates the standardize of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="rank"></a>

## rank(x)
Calculates the rank of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |

<a name="pearson"></a>

## pearson(x, y)
Calculates the Pearson correlation coefficient for two variables.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| y | `number` | Array of numbers. |

<a name="spearman"></a>

## spearman(x, y)
Calculates the Spearman correlation coefficient for two variables.

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| y | `number` | Array of numbers. |

<a name="euclideanDistance"></a>

## euclideanDistance(x, y)
Calculates the Euclidean distance of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| y | `number` | Array of numbers. |

<a name="manhattanDistance"></a>

## manhattanDistance(x, y)
Calculates the Manhattan (city) distance of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of numbers. |
| y | `number` | Array of numbers. |

<a name="pairwiseDistance"></a>

## pairwiseDistance(x, distanceMetric)
Calculates the pairwise distance of an array

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| x | `number` | Array of array of numbers. |
| distanceMetric | `function` | Distance metric function |

<a name="hierarchicalClustering"></a>

## hierarchicalClustering(pairwiseDistances, linkage)
Computes a hierarchical clustering of a matrix

**Kind**: global function  

| Param | Type | Description |
| --- | --- | --- |
| pairwiseDistances | `number` | Pairwise distance matrix. |
| linkage | `string` | Linkage criterion. Inspired by Heather Arthur's clusterfck: https://github.com/harthur/clusterfck |

---

## File: docs/table.md

<a name="Table"></a>

## Table
**Kind**: global class  

* [Table](#Table)
    * [new Table(data, keys, headers, id, className)](#new_Table_new)
    * [.generate(headers, id, className)](#Table+generate)
    * [.appendTo(id)](#Table+appendTo)
    * [.title(text)](#Table+title) ⇒ `string`

<a name="new_Table_new"></a>

### new Table(data, keys, headers, id, className)
Creates an HTML table element from a list of dictionaries.


| Param | Type | Default | Description |
| --- | --- | --- | --- |
| data | `Array.&lt;Object&gt;` |  | list of JSON objects (can include HTML elements) |
| keys | `Array.&lt;string&gt;` |  | (optional) - array of titles to show, in order |
| headers | `Array.&lt;string&gt;` |  | (optional) - dictionary of header replacements |
| id | `string` | `&quot;data-table&quot;` | (optional) - id for HTML table element |
| className | `string` | `&quot;data-table&quot;` | (optional) - class for HTML table element |

**Example**  
```js
> table = Table([{"column_one": 1}], ["column_one"], {"column_one": "New Name"},
                "new-id", "new-class");
> table.appendTo("parent-id")
```
<a name="Table+generate"></a>

### table.generate(headers, id, className)
Generates an HTML table element and saves it in this.table

**Kind**: instance method of [`Table`](#Table)  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| headers | `Array.&lt;string&gt;` |  | dictionary of header replacements |
| id | `string` | `&quot;data-table&quot;` | id for HTML table element |
| className | `string` | `&quot;data-table&quot;` | class for HTML table element |

<a name="Table+appendTo"></a>

### table.appendTo(id)
Appends the table onto the element with id.

**Kind**: instance method of [`Table`](#Table)  

| Param | Type | Description |
| --- | --- | --- |
| id | `string` | id of parent container |

**Example**  
```js
> table = Table([{"column_one": 1}]);
> table.appendTo("parent-id")
```
<a name="Table+title"></a>

### table.title(text) ⇒ `string`
Utility funtion to give title case of headers

**Kind**: instance method of [`Table`](#Table)  

| Param | Type | Description |
| --- | --- | --- |
| text | `string` | heading of column |

**Example**  
```js
> table = Table([{"column_one": 1}]);
> table.title("column one")
"Column One"
```

---

## File: docs/utils.md

## Classes

<dl>
<dt>[Histogram](#Histogram)</dt>
<dd></dd>
</dl>

## Functions

<dl>
<dt>[makeLink(text, url)](#makeLink) ⇒ `Object`</dt>
<dd>Returns a span element with link to item.
</dd>
<dt>[copy(obj)](#copy) ⇒ `Object`</dt>
<dd>Returns a deepcopy of an object
</dd>
<dt>[identity(obj)](#identity) ⇒ `Object`</dt>
<dd>A function that returns what it is given
</dd>
<dt>[compare(field, reverse, func)](#compare) ⇒ `function`</dt>
<dd>Creates a comparison function used in sorting
</dd>
<dt>[capitalize(text)](#capitalize) ⇒ `string`</dt>
<dd>Returns a string with first letter capitalized
</dd>
<dt>[title(text)](#title) ⇒ `string`</dt>
<dd>Returns a string with first letter of every word capitalized
</dd>
<dt>[format(date, mask, utc)](#format) ⇒ `string`</dt>
<dd>Formats a Date object as a string.
Date Format 1.2.3
(c) 2007-2009 Steven Levithan &lt;stevenlevithan.com&gt;
MIT license
Includes enhancements by Scott Trenda &lt;scott.trenda.net&gt;
and Kris Kowal &lt;cixar.com/~kris.kowal/&gt;
Accepts a date, a mask, or a date and a mask.
Returns a formatted version of the given date.
The date defaults to the current date/time.
The mask defaults to dateFormat.masks.default.
</dd>
</dl>

<a name="Histogram"></a>

## Histogram
**Kind**: global class  

* [Histogram](#Histogram)
    * [new Histogram(hist)](#new_Histogram_new)
    * [.getMinMax()](#Histogram+getMinMax)
    * [.createValues(start, stop, step, offset)](#Histogram+createValues)
    * [.getBinIndex(value)](#Histogram+getBinIndex)
    * [.binarySearch(value, low, high)](#Histogram+binarySearch)
    * [.getCounts(min_value, max_value, span_value)](#Histogram+getCounts)

<a name="new_Histogram_new"></a>

### new Histogram(hist)
Create a histogram. Data is stored in exponentially
distributed buckets.


| Param | Type | Description |
| --- | --- | --- |
| hist | `JSON` | A histogram in JSON format |

<a name="Histogram+getMinMax"></a>

### histogram.getMinMax()
Get min and max values for defaults.

**Kind**: instance method of [`Histogram`](#Histogram)  
<a name="Histogram+createValues"></a>

### histogram.createValues(start, stop, step, offset)
Create the values for each bucket.

**Kind**: instance method of [`Histogram`](#Histogram)  

| Param | Type | Description |
| --- | --- | --- |
| start | `number` | the starting range |
| stop | `number` | the stoping range |
| step | `number` | the step to increment, in percent |
| offset | `number` | the offset, usually zero |

<a name="Histogram+getBinIndex"></a>

### histogram.getBinIndex(value)
Get the bucket index.

**Kind**: instance method of [`Histogram`](#Histogram)  

| Param | Type | Description |
| --- | --- | --- |
| value | `number` | get the bucket index of value |

<a name="Histogram+binarySearch"></a>

### histogram.binarySearch(value, low, high)
Find the value's bucket using binary search.

**Kind**: instance method of [`Histogram`](#Histogram)  

| Param | Type | Description |
| --- | --- | --- |
| value | `number` | the value to lookup |
| low | `number` | the lowest value |
| high | `number` | the highest value |

<a name="Histogram+getCounts"></a>

### histogram.getCounts(min_value, max_value, span_value)
Compute the counts for each span.

**Kind**: instance method of [`Histogram`](#Histogram)  

| Param | Type | Description |
| --- | --- | --- |
| min_value | `number` | the starting value |
| max_value | `number` | the stoping value |
| span_value | `number` | the step to increment, in value |

<a name="makeLink"></a>

## makeLink(text, url) ⇒ `Object`
Returns a span element with link to item.

**Kind**: global function  
**Returns**: `Object` - a span node with link as contents  

| Param | Type | Description |
| --- | --- | --- |
| text | `string` | the text for the URL |
| url | `string` | the address for the URL |

**Example**  
```js
> makeLink("The Text", "https://company.com/")
<span><a href="https://company.com/">The Text</span>
```
<a name="copy"></a>

## copy(obj) ⇒ `Object`
Returns a deepcopy of an object

**Kind**: global function  
**Returns**: `Object` - a copy of the obj  

| Param | Type | Description |
| --- | --- | --- |
| obj | `Object` | an object to copy |

**Example**  
```js
> copy({"key": "value"})
{"key": "value"}
```
<a name="identity"></a>

## identity(obj) ⇒ `Object`
A function that returns what it is given

**Kind**: global function  
**Returns**: `Object` - the object or value  

| Param | Type | Description |
| --- | --- | --- |
| obj | `Object` | an object or value |

**Example**  
```js
> identity(42)
42
```
<a name="compare"></a>

## compare(field, reverse, func) ⇒ `function`
Creates a comparison function used in sorting

**Kind**: global function  
**Returns**: `function` - the sorting comparison function  

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| field | `string` |  | the name of an attribute of an object |
| reverse | `Object` | `false` | if true, reverse the sort order |
| func | `function` |  | a function to apply to the field before sorting |

**Example**  
```js
> [
   {"field1": 23, ...},
   {"field1": 6, ...},
  ].sort(compare("field1"))

[{"field1": 6, ...}, {"field1": 23, ...}]
```
<a name="capitalize"></a>

## capitalize(text) ⇒ `string`
Returns a string with first letter capitalized

**Kind**: global function  
**Returns**: `string` - capitalized string  

| Param | Type | Description |
| --- | --- | --- |
| text | `string` | the text to capitalize |

**Example**  
```js
> capitalized("some text");
"Some text"
```
<a name="title"></a>

## title(text) ⇒ `string`
Returns a string with first letter of every word capitalized

**Kind**: global function  
**Returns**: `string` - capitalized word string  

| Param | Type | Description |
| --- | --- | --- |
| text | `string` | the text of words to capitalize |

**Example**  
```js
> capitalized("some text");
"Some Text"
```
<a name="format"></a>

## format(date, mask, utc) ⇒ `string`
Formats a Date object as a string.

Date Format 1.2.3
(c) 2007-2009 Steven Levithan <stevenlevithan.com>
MIT license

Includes enhancements by Scott Trenda <scott.trenda.net>
and Kris Kowal <cixar.com/~kris.kowal/>

Accepts a date, a mask, or a date and a mask.
Returns a formatted version of the given date.
The date defaults to the current date/time.
The mask defaults to dateFormat.masks.default.

**Kind**: global function  
**Returns**: `string` - the data as a string format  

| Param | Type | Description |
| --- | --- | --- |
| date | `Date` | instance |
| mask | `string` |  |
| utc | `string` |  |

**Example**  
```js
> new Date().format("HH:MM:ss")
"23:30:56"
```