Home > @josh-brown/vector > SupportVectorMachineClassifier
A Classifier model which uses logistic regression to predict a discrete target. The optimal set of parameters is computed with gradient descent.
Signature:
export declare class SupportVectorMachineClassifier implements Classifier<SupportVectorMachineHyperparams>
Implements: Classifier<SupportVectorMachineHyperparams>
Constructor | Modifiers | Description |
---|---|---|
(constructor)(hyperParameters) | Constructs a new instance of the SupportVectorMachineClassifier class |
Method | Modifiers | Description |
---|---|---|
getHyperParameters() | Return the full set of hyperparameters used to train the model, including defaults. | |
getParameters() | Get the weights of the trained SVM, or undefined if the model has not been trained. |
|
predict(data) | Uses the learned parameters to make predictions based on a set of input data. | |
predictProbabilities(_data) | Uses the learned parameters to make predictions for the probability of an event based on a set of input data. | |
train(data, target) | Learns the optimal set of parameters for the model. |