-
Notifications
You must be signed in to change notification settings - Fork 5
Retina matrix functions
Using the Retina matrix functions requires loading of the numeric.min.js module in the Retina/js directory via Retina.require('numeric.min.js').
Retina.pca(matrix)
Given a distance matrix matrix as is returned from Retina.distanceMatrix returns an object with the properties coordinates containing the pca matrix and weights containing a list of dimension weights.
Retina.transpose(matrix)
Returns the matrix transposed along the x-y-diagonal.
Retina.logMatrix(matrix)
Returns the matrix with log10 called on every element.
Retina.standardizeMatrix(matrix)
Returns a standardized version of matrix, see standardization.
Retina.normalizeMatrix(matrix)
Returns a normalized version of matrix where each cell is divided by the sum of its column.
Retina.scaleMatrix(matrix)
Returns a scaled version of matrix where each cell is divided by the maximum of its column.
Retina.heatMatrix(matrix)
Returns a heatmap matrix of matrix.
Retina.average(vector)
Returns the average value of the elements in vector.
Retina.distanceMatrix(matrix, measure)
Returns the distance matrix of matrix. The measure defaults to euclidean distance and can be one of
- euclidean
- maximum
- manhattan
- minkowski
- braycurtis
Retina.copyMatrix(matrix)
Returns a copy of matrix which does not maintain a reference to the original.
Retina.roundMatrix(matrix, precision)
Returns matrix with every entry rounded to precision.