Classification Models API Reference
Functions
ChemometricsTools.GaussianDiscriminant — Method.GaussianDiscriminant(M, X, Y; Factors = nothing)Returns a GaussianDiscriminant classification model on basis object M (PCA, LDA) and one hot encoded Y.
ChemometricsTools.GaussianDiscriminant — Method.( model::GaussianDiscriminant )( Z; Factors = size(model.ProjectedClassMeans)[2] )Returns a 1 hot encoded inference from Z using a GaussianDiscriminant object. This function enforces positive definiteness in the class covariance matrices.
ChemometricsTools.GaussianNaiveBayes — Method.GaussianNaiveBayes(X,Y)Returns a GaussianNaiveBayes classification model object from X and one hot encoded Y.
ChemometricsTools.GaussianNaiveBayes — Method.(gnb::GaussianNaiveBayes)(X)Returns a 1 hot encoded inference from X using a GaussianNaiveBayes object.
ChemometricsTools.KNN — Type.KNN( X, Y; DistanceType::String )DistanceType can be "euclidean", "manhattan". Y Must be one hot encoded.
Returns a KNN classification model.
ChemometricsTools.KNN — Method.( model::KNN )( Z; K = 1 )Returns a 1 hot encoded inference from X with K Nearest Neighbors, using a KNN object.
ChemometricsTools.LogisticRegression — Method.( model::LogisticRegression )( X )Returns a 1 hot encoded inference from X using a LogisticRegression object.
ProbabilisticNeuralNetwork( X, Y )Stores data for a PNN. Y Must be one hot encoded.
Returns a PNN classification model.
(PNN::ProbabilisticNeuralNetwork)(X; sigma = 0.1)Returns a 1 hot encoded inference from X with a probabilistic neural network.
ChemometricsTools.SIMCA — Method.SIMCA( X, Y;
VarianceExplained = repeat([0.95], size(Y)[2]),
Quantile = repeat([0.95], size(Y)[2]) )Returns a Soft-Independent Modelling of Class Analogies(SIMCA) classification model object from X and one hot encoded Y.
ChemometricsTools.SIMCA — Method.(s::SIMCA)( X )Returns a 1 hot encoded inference from X from a SIMCA model.
ChemometricsTools.ConfidenceEllipse — Function.ConfidenceEllipse(cov, mean, confidence, axis = [1,2]; pointestimate = 180 )Returns a 2-D array whose columns are X & Y coordinates of a confidence ellipse. The ellipse is generated by the covariance matrix, mean vector, and the number of points to include in the plot.
ChemometricsTools.LinearPerceptronBatch — Method.LinearPerceptron(X, Y; LearningRate = 1e-3, MaxIters = 5000)Returns a batch trained LinearPerceptron classification model object from X and one hot encoded Y.
ChemometricsTools.LinearPerceptronSGD — Method.LinearPerceptronsgd(X, Y; LearningRate = 1e-3, MaxIters = 5000)Returns a SGD trained LinearPerceptron classification model object from X and one hot encoded Y.
MultinomialSoftmaxRegression(X, Y; LearnRate = 1e-3, maxiters = 1000, L2 = 0.0)Returns a LogisticRegression classification model made by Stochastic Gradient Descent.
ChemometricsTools.linearperceptron — Method.(L::linearperceptron)(X)Returns a 1 hot encoded inference from X using a LinearPerceptron object.