Skip to content

Latest commit

 

History

History
139 lines (63 loc) · 2.35 KB

File metadata and controls

139 lines (63 loc) · 2.35 KB

Home > @josh-brown/vector > LogisticRegressionClassifier

LogisticRegressionClassifier class

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 LogisticRegressionClassifier implements Classifier<LogisticRegressionHyperparams> 

Implements: Classifier<LogisticRegressionHyperparams>

Constructors

Constructor

Modifiers

Description

(constructor)(hyperParameters)

Constructs a new instance of the LogisticRegressionClassifier class

Methods

Method

Modifiers

Description

getHyperParameters()

Return the full set of hyperparameters used to train the model, including defaults.

getParameters()

Get the coefficients of the trained linear regression model, 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.