Class: Vectors

eclairjs/mllib/linalg.Vectors

new Vectors()

Source:

Methods

(static) dense(value, …Optional) → {module:eclairjs/mllib/linalg.Vector}

Creates a dense vector from its values.
Parameters:
Name Type Attributes Description
value Array.<number> | number
Optional number <repeatable>
otherValues (if value is not an array)
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) dense(value, …Optional) → {module:eclairjs/mllib/linalg.Vector}

Creates a dense vector from its values.
Parameters:
Name Type Attributes Description
value Array.<number> | number
Optional number <repeatable>
otherValues (if value is not an array)
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) sparse(size, indices, values) → {module:eclairjs/mllib/linalg.Vector}

Creates a sparse vector providing its index array and value array.
Parameters:
Name Type Description
size integer vector size.
indices Array.<integer> index array, must be strictly increasing.
values Array.<float> value array, must have the same length as indices.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) sparse(size, indices, values) → {module:eclairjs/mllib/linalg.Vector}

Creates a sparse vector providing its index array and value array.
Parameters:
Name Type Description
size integer vector size.
indices Array.<integer> index array, must be strictly increasing.
values Array.<float> value array, must have the same length as indices.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

eclairjs/mllib/linalg.Vectors

new Vectors()

Source:

Methods

(static) dense(value, …Optional) → {module:eclairjs/mllib/linalg.Vector}

Creates a dense vector from its values.
Parameters:
Name Type Attributes Description
value Array.<number> | number
Optional number <repeatable>
otherValues (if value is not an array)
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) dense(value, …Optional) → {module:eclairjs/mllib/linalg.Vector}

Creates a dense vector from its values.
Parameters:
Name Type Attributes Description
value Array.<number> | number
Optional number <repeatable>
otherValues (if value is not an array)
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) sparse(size, indices, values) → {module:eclairjs/mllib/linalg.Vector}

Creates a sparse vector providing its index array and value array.
Parameters:
Name Type Description
size integer vector size.
indices Array.<integer> index array, must be strictly increasing.
values Array.<float> value array, must have the same length as indices.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

(static) sparse(size, indices, values) → {module:eclairjs/mllib/linalg.Vector}

Creates a sparse vector providing its index array and value array.
Parameters:
Name Type Description
size integer vector size.
indices Array.<integer> index array, must be strictly increasing.
values Array.<float> value array, must have the same length as indices.
Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector