Class: LogisticRegressionClassifier

LogisticRegressionClassifier()

Class for a Logistic Regression Classifier.

Constructor

new LogisticRegressionClassifier()

Source:

Methods

classifyObservation(srcObservation, classifications)

Given an observation and an array for inserting the results, it calculates the score of the observation for each of the classifications and fills the array with the result objects.
Parameters:
Name Type Description
srcObservation Object Source observation.
classifications Array.<Object> Array of classifications.
Source:

newClassification(observation, indexClassification)

Given an observation vector and the index of one of the classifications, it returns an object that contains the label of the classification and the score of the vector for this classification.
Parameters:
Name Type Description
observation Vector Observation vector.
indexClassification Number Index of the classification.
Source:

(async) train()

Train the logistic regression clasifier, that means that it calculates the thetas that relates all the features with the classifications, so when a new vector of features is the input to classify, these thetas are the weights for the calculation of the scores of each classification.
Source: