dimensionality_reduction UMAP

new UMAP(X, parameters) → {UMAP}

Parameters:
NameTypeAttributesDefaultDescription
XMatrix

the high-dimensional data.

parametersObject

Object containing parameterization of the DR method.

Properties
NameTypeAttributesDefaultDescription
n_neighborsNumber<optional>
15

size of the local neighborhood.

local_connectivityNumber<optional>
1

number of nearest neighbors connected in the local neighborhood.

min_distNumber<optional>
1

controls how tightly points get packed together.

dNumber<optional>
2

the dimensionality of the projection.

metricfunction<optional>
euclidean

the metric which defines the distance between two points in the high-dimensional space.

_spreadNumber<optional>
1

The effective scale of embedded points. (In combination with parameters.min_dist)

_set_op_mix_ratioNumber<optional>
1

Interpolate between union and intersection.

_repulsion_strengthNumber<optional>
1

Weighting applied to negative samples.

_negative_sample_rateNumber<optional>
5

The number of negative samples per positive sample.

_n_epochsNumber<optional>
350

The number of training epochs.

parameter._initial_alphaNumber<optional>
1

The initial learning rate for the optimization.

parameters.seedNumber<optional>
1212

the seed for the random number generator.

Returns:
Type: 
UMAP

Extends

Members

projection

Overrides

Methods

check_init() → {DR}

If the respective DR method has an init function, call it before transform.

Overrides
Returns:
Type: 
DR

(generator) generator(iterationsopt) → {Matrix|Array}

Parameters:
NameTypeAttributesDefaultDescription
iterationsNumber<optional>
350

number of iterations.

Overrides
Returns:
Type: 
Matrix | Array

init() → {UMAP}

Computes all necessary

Returns:
Type: 
UMAP

parameter(nameopt, valueopt) → {DR|any|Object}

Set and get parameters

Parameters:
NameTypeAttributesDefaultDescription
nameString<optional>
null

Name of the parameter. If not given then returns all parameters as an Object.

valueany<optional>
null

Value of the parameter to set. If name is set and value is not given, returns the value of the respective parameter.

Overrides
Returns:

On setting a parameter, this function returns the DR object. If name is set and value == null then return actual parameter value. If name is not given, then returns all parameters as an Object.

Type: 
DR | any | Object
Example
'''
const DR = new druid.TSNE(X, {d: 3}); // creates a new DR object, with parameter for <code>d</code> = 3.
DR.parameter("d"); // returns 3,
DR.parameter("d", 2); // sets parameter <code>d</code> to 2 and returns <code>DR</code>.
'''

transform(iterationsopt) → {Matrix|Array}

Parameters:
NameTypeAttributesDefaultDescription
iterationsNumber<optional>
350

number of iterations.

Overrides
Returns:
Type: 
Matrix | Array

(async) transform_async(…args) → {Promise.<(Matrix|Array.<Array.<Number>>)>}

Computes the projection.

Parameters:
NameTypeAttributesDescription
argsunknown<repeatable>

Arguments the transform method of the respective DR method takes.

Returns:

the dimensionality reduced dataset.

Type: 
Promise.<(Matrix|Array.<Array.<Number>>)>