Home Reference Source # References

## arrays

 summary public F abs(A: Array): Array Get a copy of an array with absolute values of the original array entries. public F argFilter(array: Array, callback: function(element: mixed, !index: Number): boolean): Array Filter an array and return the array indices where the filter was matched. public F argMax(array: Array): number Get array key corresponding to largest element in the array. public F argSort(array: Array, compareFunction: function(a: mixed, b: mixed): Number): Array Sort an array and return the array indices of the sorted elements. public F concatenate(axis: number, S: ...Array): Array Concatenate two or more n-dimensional arrays. public F dot(x: Array, y: Array): number Calculate dot product of two vectors. public F equal(array1: Array | mixed, array2: Array | mixed): boolean Deep check whether two arrays are equal: sub-arrays will be traversed, and strong type checking is enabled. public F fill(A: Array, value: mixed): Array Set all entries in an array to a specific value and return the resulting array. public F flatten(A: Array): Array Recursively flatten an array. public F full(shape: Array, value: mixed): Array Initialize an n-dimensional array of a certain value. public F getArrayElement(A: Array, index: Array): mixed Get an arbitrary element from an array, using another array to determine the index inside the first array. public F getShape(A: Array): Array Find the shape of an array, i.e. public F internalSum(A: Array): number Sum all elements of an array. public F linspace(a: number, b: number, n: number): Array Generate n points on the interval (a,b), with intervals (b-a)/(n-1). public F meshGrid(x: Array, y: Array): Array>> Generate a mesh grid, i.e. public F norm(x: Array): * Calculate the Euclidian norm of a vector. public F pad(A: Array, paddingLengths: Array|Array>, paddingValues: Array|Array>, axes: Array): Array Pad an array along one or multiple axes. public F permuteAxes(A: Array, newAxes: Array): Array Permute the axes of an input array. public F power(A: Array, y: number | Array): Array Raise all elements in an array to some power. public F repeat(axis: number, numRepeats: number, A: Array): Array Repeat an array multiple times along an axis. public F reshape(A: Array, shape: Array): Array Reshape an array into a different shape. public F scale(A: Array, c: number): Array Multiply each element of an array by a scalar (i.e. public F setArrayElement(A: Array, index: Array, value: mixed): * Set an arbitrary element in an array, using another array to determine the index inside the array. public F shuffle(S: ...Array): Array> Randomly shuffle multiple arrays in the primary (first) axis. public F slice(A: Array, start: Array, stop: Array): Array Take a slice out of an input array. public F subBlock(A: Array, offset: Array, shape: Array): Array this function was deprecated. Use slice() instead Extract a sub-block of a matrix of a particular shape at a particular position. public F sum(S: ...Array): Array Calculate element-wise sum of two or more arrays. public F transpose(A: Array>): Array> Get the transpose of a matrix or vector. public F unique(array: Array): Array Get unique elements in array public F valueCounts(array: Array): Array> Count the occurrences of the unique values in an array public F valueVector(n: number, value: mixed): * Initialize a vector of a certain length with a specific value in each entry. public F wrapSlice(array: Array, begin: number, end: number): Array Take a slice out of an array, but wrap around the beginning an end of the array. public F zeros(shape: Array): Array Initialize an n-dimensional array of zeros. public F zipWithIndex(array: Array): Array> From an input array, create a new array where each element is comprised of a 2-dimensional array where the first element is the original array entry and the second element is its index

## classification

 summary public The decision boundary module calculates decision boundaries for a trained classifier on a 2-dimensional grid of points.

## data

 summary public Datapoint in a dataset, with features and possibly a class index. public Container of data points for a single data set.

## datasets

 summary public F loadDatasetFromCSV(input: string, callback: function(X: Array>, y: Array)) Load a dataset (features and target) from some CSV input string. public F loadDatasetFromRemoteCSV(url: string, callback: function(X: Array>, y: Array)) Load a dataset from a remote CSV file. public F loadIris(callback: function(X: Array>, y: Array)) Load the iris dataset.

## kernel

 summary public Base class for kernels, which calculate some distance metric between two data points public The Gaussian kernel, also known as the radial basis function (RBF) kernel public The linear kernel calculates the dot product of the two input vectors public The Polynomial kernel. public The Sigmoid kernel.

## model-selection

 summary public F trainTestSplit(input: Array>, optionsUser: Object): Array Split a dataset into a training and a test set.

## preprocessing

 summary public Encoder of categorical values to integers.

## random

 summary public F rand(a: number, b: number): number Generate a random number between a lower bound (inclusive) and an upper bound (exclusive). public F randint(a: number, b: number, shape: number | Array): number | Array Generate a random integer between a lower bound (inclusive) and an upper bound (exclusive). public F sample(input: Array, number: number, withReplacement: boolean, weights: Array | string): Array Take a random sample with or without replacement from an array. public F sampleFisherYates(input: Array, number: number): Array Take a random sample without replacement from an array.

## supervised

 summary public Base class for classifiers. public Base class for supervised estimators (classifiers or regression models). public Base class for multiclass classifiers using the one-vs-all classification method.

## supervised/linear

 summary public Logistic Regression learner for binary classification problem. public Logistic Regression learner for 2 or more classes. public Perceptron learner for binary classification problem. public Perceptron learner for 2 or more classes.

## supervised/neighbors

 summary public Base class for neighbors-based classifiers such as KNN public C KNN k-nearest neighbours learner.

## supervised/neural-network

 summary public

## supervised/svm

 summary public SVM learner for binary classification problem. public C SVM Support Vector Machine (SVM) classification model for 2 or more classes.

## supervised/trees

 summary public Decision tree learner. public Decision tree node. public Random forest learner. public public

## ui

 summary public UI canvas for displaying machine learning results. public Data point element to be drawn on the canvas

## unsupervised

 summary public Base class for clustering algorithms.

## unsupervised/neighbors

 summary public k-means clusterer.

## util/input-devices

 summary public F getTouchCoordinate(e: object, coordinate: string): * Get touch coordinate (x or y) from touchpad input.
 summary public F binaryIntervalSearch(array: Array, value: number): number Perform a binary search in a sorted array A to find the index i such that the search value is larger than or equal to A[i], and strictly smaller than A[i+1].

## validation/metrics

 summary public F accuracy(yTrue: Array, yPred: Array, normalize: boolean): number Evaluate the accuracy of a set of predictions. public F auroc(yTrue: Array, yPred: Array): number Calculate the area under the receiver-operator characteristic curve (AUROC) for a set of predictions.