Distances API Reference
Functions
ChemometricsTools.Kernel — Method.(K::Kernel)(X)This is a convenience function to allow for one-line construction of kernels from a Kernel object K and new data X.
ChemometricsTools.Kernel — Method.Kernel(X::Array)Default constructor for Kernel object. Returns the linear kernel of X.
ChemometricsTools.AdjacencyMatrix — Method.NearestNeighbors(DistanceMatrix)Returns the nearest neighbor adjacency matrix from a given DistanceMatrix.
ChemometricsTools.CauchyKernel — Method.CauchyKernel(X, Y, sigma)Creates a Cauchy kernel from Arrays X and Y using hyperparameters sigma.
ChemometricsTools.CauchyKernel — Method.CauchyKernel(X, sigma)Creates a Cauchy kernel from Array X using hyperparameters sigma.
ChemometricsTools.CenterKernelMatrix — Function.CenterKernelMatrix(X)Returns a centered kernel matrix.
ChemometricsTools.EuclideanDistance — Method.EuclideanDistance(X, Y)Returns the euclidean distance matrix of X and Y such that the columns are the samples in Y.
ChemometricsTools.EuclideanDistance — Method.EuclideanDistance(X)Returns the Grahm aka the euclidean distance matrix of X.
ChemometricsTools.GaussianKernel — Method.GaussianKernel(X, Y, sigma)Creates a Gaussian/RBF kernel from Arrays X and Y with hyperparameter sigma.
ChemometricsTools.GaussianKernel — Method.GaussianKernel(X, sigma)Creates a Gaussian/RBF kernel from Array X using hyperparameter sigma.
ChemometricsTools.InClassAdjacencyMatrix — Function.InClassAdjacencyMatrix(DistanceMatrix, YHOT, K = 1)Computes the in class Adjacency matrix with K nearest neighbors.
ChemometricsTools.LevenshteinDistance — Method.LevenshteinDistance(s::AbstractString, t::AbstractString)Calculates the LevenshteinDistance aka the edit distance between 2 strings.
Borrowed from: https://rosettacode.org/wiki/Levenshtein_distance#Julia
ChemometricsTools.LinearKernel — Method.LinearKernel(X, Y, c)Creates a Linear kernel from Arrays X and Y with hyperparameter C.
ChemometricsTools.LinearKernel — Method.LinearKernel(X, c)Creates a Linear kernel from Array X and hyperparameter C.
ChemometricsTools.ManhattanDistance — Method.ManhattanDistance(X, Y)Returns the Manhattan distance matrix of X and Y such that the columns are the samples in Y.
ChemometricsTools.ManhattanDistance — Method.ManhattanDistance(X)Returns the Manhattan distance matrix of X.
ChemometricsTools.MinkowskiDistance — Method.MinkowskiDistance(X, Y, p)Returns the Minkowski distance matrix of X and Y using order p such that the columns are the samples in Y.
ChemometricsTools.MinkowskiDistance — Method.MinkowskiDistance(X, p)Returns the Manhattan distance matrix of X using order p.
ChemometricsTools.NearestNeighbors — Method.NearestNeighbors(DistanceMatrix, N)Returns a matrix of dimensions DistanceMatrix rows, by N columns. Basically this goes through each row and finds the ones corresponding column which has the smallest distance.
ChemometricsTools.OutOfClassAdjacencyMatrix — Function.OutOfClassAdjacencyMatrix(DistanceMatrix, YHOT, K = 1)Computes the out of class Adjacency matrix with K nearest neighbors.
SquareEuclideanDistance(X, Y)Returns the squared euclidean distance matrix of X and Y such that the columns are the samples in Y.
SquareEuclideanDistance(X)Returns the squared Grahm aka the euclidean distance matrix of X.