Skip to content

@saehrimnir/druidjs

Clustering

ClassDescription
CURECURE (Clustering Using REpresentatives)
HierarchicalClusteringHierarchical Clustering
KMeansK-Means Clustering
KMedoidsK-Medoids (PAM - Partitioning Around Medoids)
MeanShiftMean Shift Clustering
OPTICSOPTICS (Ordering Points To Identify the Clustering Structure)
XMeansX-Means Clustering

Data Structures

ClassDescription
DisjointSet-
Heap-

Dimensionality Reduction

ClassDescription
FASTMAPFastMap algorithm for dimensionality reduction.
ISOMAPIsomap (Isometric Mapping)
LDALinear Discriminant Analysis (LDA)
LLELocally Linear Embedding (LLE)
LSPLeast Square Projection (LSP)
LTSALocal Tangent Space Alignment (LTSA)
MDSClassical Multidimensional Scaling (MDS)
PCAPrincipal Component Analysis (PCA)
SAMMONSammon's Mapping
SMACOFMetric Multidimensional Scaling (MDS) via SMACOF.
SQDMDSSQuadMDS (Stochastic Quartet MDS)
TopoMapTopoMap
TriMapTriMap
TSNEt-SNE (t-Distributed Stochastic Neighbor Embedding)
UMAPUniform Manifold Approximation and Projection (UMAP)

KNN

ClassDescription
AnnoyAnnoy-style (Approximate Nearest Neighbors Oh Yeah) implementation using Random Projection Trees.
BallTreeBall Tree for efficient nearest neighbor search.
HNSWHierarchical Navigable Small World (HNSW) graph for approximate nearest neighbor search.
KDTreeKD-Tree (K-dimensional Tree) for efficient nearest neighbor search.
LSHLocality Sensitive Hashing (LSH) for approximate nearest neighbor search.
NaiveKNNNaive KNN implementation using a distance matrix.
NNDescentNN-Descent

Linear Algebra

FunctionDescription
inner_product-
qrComputes the QR Decomposition of the Matrix A using Gram-Schmidt process.
qr_householderComputes the QR Decomposition of the Matrix A with householder transformations.
simultaneous_poweriterationComputes the k biggest Eigenvectors and Eigenvalues from Matrix A with the QR-Algorithm.

Matrix

NameDescription
Matrix-
distance_matrixComputes the distance matrix of datamatrix A.
k_nearest_neighborsComputes the k-nearest neighbors of each row of A.
linspaceCreates an Array containing number numbers from start to end. If number = null.
normComputes the norm of a vector, by computing its distance to 0.
normalizeNormalizes Vector v.

Metrics

FunctionDescription
bray_curtisComputes the Bray-Curtis distance between a and b.
canberraComputes the canberra distance between a and b.
chebyshevComputes the chebyshev distance (L) between a and b.
cosineComputes the cosine distance (not similarity) between a and b.
euclideanComputes the euclidean distance (l_2) between a and b.
euclidean_squaredComputes the squared euclidean distance (l_2^2) between a and b.
goodman_kruskalComputes the Goodman-Kruskal gamma coefficient for ordinal association.
hammingComputes the hamming distance between a and b.
haversineComputes the Haversine distance between two points on a sphere of unit length 1. Multiply the result with the radius of the sphere. (For instance Earth's radius is 6371km)
jaccardComputes the jaccard distance between a and b.
manhattanComputes the manhattan distance (l_1) between a and b.
sokal_michenerComputes the Sokal-Michener distance between a and b.
wassersteinComputes the 1D Wasserstein distance (Earth Mover's Distance) between two distributions.
yuleComputes the yule distance between a and b.

Numerical

FunctionDescription
kahan_sumNumerical stable summation with the Kahan summation algorithm.
neumair_sumNumerical stable summation with the Neumair summation algorithm.

Optimization

FunctionDescription
powell-

Other

NameDescription
EigenArgs-
ParametersAnnoy-
ParametersBallTree-
ParametersCURE-
ParametersFASTMAP-
ParametersHierarchicalClustering-
ParametersHNSW-
ParametersISOMAP-
ParametersKDTree-
ParametersKMeans-
ParametersKMedoids-
ParametersLDA-
ParametersLLE-
ParametersLSH-
ParametersLSP-
ParametersLTSA-
ParametersMDS-
ParametersMeanShift-
ParametersNaiveKNN-
ParametersNNDescent-
ParametersOptics-
ParametersPCA-
ParametersSAMMON-
ParametersSMACOF-
ParametersSQDMDS-
ParametersTopoMap-
ParametersTriMap-
ParametersTSNE-
ParametersUMAP-
ParametersXMeans-
Comparator-
InputType-
Metric-
QRDecomposition-
version-

Utils

NameDescription
Randomizer-
maxReturns maximum in Array values.
minReturns maximum in Array values.