Title

Global

Members

arrayToMap

Converts a matrix into a DAG graph as a map

View Source map/map.js, line 5

arrayToObject

Converts an array of arrays into an array of objects, given a list of ordered keys

View Source array/array.js, line 75

arrayWith

Create a new array of n elements, all equal to value

View Source array/array.js, line 40

average

Calculate the average between the points inside data

  • returns just the average value if data is an array of values
  • returns an array of averages if data is an array of arrays

View Source statistics/statistics.js, line 33

copyArray

Creates a copy of the v array

View Source array/array.js, line 25

Distances

Class used to handle distances functions

View Source distances/distances.js, line 1

Example
//new instance
let distances = new Distances();
//define two points
let point1 = [1,3];
let point2 = [4,-2];
//minkowski distance from two points
let minkowski_distance = distances.minkowski(point1,point2);
//chebyshev distance from two points
let chebyshev_distance = distances.chebyshev(point1,point2);
//mahalanobis distance from two points
let mahalanobis_distance = distances.mahalanobis(point1,point2);
//setting the grade for minkowski
distances.setMinkowskiDegree(2);

extractKeys

Extracts the keys from an objects and put them inside an array as strings

View Source array/array.js, line 96

mapToArray

Converts a Direct Acyclic Graph (DAG) into an array

View Source map/map.js, line 36

objectToArray

Converts an array of object into an array of arrays

View Source array/array.js, line 57

randf

Generate a random float between a and b (b excluded)

View Source random/random.js, line 1

randfArray

Generate an array of N elements filled with random float between a and b

View Source random/random.js, line 37

randi

Generate a random integer between a and b (b excluded)

View Source random/random.js, line 12

randiArray

Generate an array of N elements filled with random integer between a and b

View Source random/random.js, line 23

variance

Calculate the variance between the points inside data

  • returns just the variance value if data is an array of values
  • returns an array of variances if data is an array of arrays

View Source statistics/statistics.js, line 2

zeros

Creates a new array with n zeros

View Source array/array.js, line 9