LogisticRegressionModel Class

Represents a logistic regression model.

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public class LogisticRegressionModel : ClassificationModel<double>
Inheritance
Object  →  Model  →  ClassificationModel<Double>  →  LogisticRegressionModel

Remarks

Use the LogisticRegressionModel class to analyze a situation where the outcome can have two or more possible values. A logistic regression model tries to express one variable, called the dependent variable, which can have only two distinct values, as a function of one or more other variables called independent variables or predictors in a specific form.

Logistic regression is a special case of a GeneralizedLinearModel with a binomial distribution and the logit link function. To perform variants of logistic regression, like probit regression, use the GeneralizedLinearModel class.

In addition to binary logistic regression, the LogisticRegressionModel can also represent multinomial logistic regression, where there may be more than two outcomes. In this case, the dependent variable must be a ICategoricalVector.

Constructors

Properties

BaseFeatureIndex Gets an index containing the keys of the columns that are required inputs to the model.
(Inherited from Model)
CanPredictProbabilities Gets whether the classifier supports predicting probabilities for each class.
(Inherited from ClassificationModel<T>)
CategoryIndex Gets the category index of the dependent variable or targets.
(Inherited from ClassificationModel<T>)
Computed Gets whether the model has been computed.
(Inherited from Model)
Obsolete.
ConvergenceStatus Gets the convergence status of the algorithm that computes the model parameters.
CovarianceMatrix Gets the covariance matrix of the model parameters.
Obsolete.
Data Gets an object that contains all the data used as input to the model.
(Inherited from Model)
DependentVariable Gets a vector that contains the dependent variable that is to be fitted.
(Inherited from ClassificationModel<T>)
Fitted Gets whether the model has been computed.
(Inherited from Model)
IndependentVariables Gets a matrix whose columns contain the independent variables in the model.
(Inherited from ClassificationModel<T>)
InputSchema Gets the schema for the features used for fitting the model.
(Inherited from Model)
LogLikelihood Gets the log-likelihood of the fitted model.
MaxDegreeOfParallelism Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from Model)
Method Gets or sets the kind of logistic regression represented by this LogisticRegressionModel.
ModelSchema Gets the collection of variables used in the model.
(Inherited from Model)
NumberOfObservations Gets the number of observations the model is based on.
(Inherited from Model)
ParallelOptions Gets or sets an object that specifies how the calculation of the model should be parallelized.
(Inherited from Model)
Parameters Gets the collection of parameters associated with this model.
ParameterValues Gets the collection of parameters associated with this model.
PredictedLogProbabilities Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModel<T>)
PredictedProbabilities Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModel<T>)
Predictions Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModel<T>)
ProbabilityResiduals Gets a matrix containing the residuals of the model.
(Inherited from ClassificationModel<T>)
Status Gets the status of the model, which determines which information is available.
(Inherited from Model)
SupportsWeights Indicates whether the model supports case weights.
(Inherited from Model)
Weights Gets or sets the actual weights.
(Inherited from Model)

Methods

Compute() Computes the model.
(Inherited from Model)
Obsolete.
Compute(ParallelOptions) Computes the model.
(Inherited from Model)
Obsolete.
Contains Returns whether another ClassificationModel<T> is nested within this instance.
(Inherited from ClassificationModel<T>)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Fit() Fits the model to the data.
(Inherited from Model)
Fit(ParallelOptions) Fits the model to the data.
(Inherited from Model)
FitCore Fits the model to the data.
(Overrides Model.FitCore(ModelInput, ParallelOptions))
GetAkaikeInformationCriterion Returns the Akaike information criterion (AIC) value for the model.
GetBaseLogLikelihood Returns the log-likelihood of the model containing only a constant term.
GetBayesianInformationCriterion Returns the Bayesian information criterion (BIC) value for the model.
GetCoxAndSnellPseudoRSquared Returns the Cox & Snell pseudo R-squared value of the model.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetInformationMatrix Calculates the information matrix for the regression.
GetLikelihoodRatioTest() Returns a test to verify the significance of the logistic model.
GetLikelihoodRatioTest(LogisticRegressionModel) Returns a test to verify the significance of the logistic model.
GetMcFaddenPseudoRSquared Returns the McFadden pseudo R-squared value of the model.
GetNagelkerkePseudoRSquared Returns the Nagelkerke pseudo R-squared value of the model.
GetPearsonGoodnessOfFitTest Returns the Wald test for all the parameters in the regression.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetWaldTest() Returns the Wald test for all the parameters in the regression.
GetWaldTest(Int32[]) Returns the Wald test for the selected parameters in the regression.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Predict(IDataFrame, ModelInputFormat) Predicts the most likely class based on the specified features.
(Inherited from ClassificationModel<T>)
Predict(Matrix<T>, ModelInputFormat) Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModel<T>)
Predict(Vector<T>, ModelInputFormat) Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModel<T>)
PredictCore(Matrix<Double>, Boolean) Predicts the value of the dependent variable based on the specified values of the features.
(Overrides ClassificationModel<T>.PredictCore(Matrix<T>, Boolean))
PredictCore(Vector<Double>, Boolean) Predicts the class based on the specified values of the features.
(Overrides ClassificationModel<T>.PredictCore(Vector<T>, Boolean))
PredictProbabilities(IDataFrame, ModelInputFormat) Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModel<T>)
PredictProbabilities(Matrix<T>, ModelInputFormat) Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModel<T>)
PredictProbabilities(Vector<T>, ModelInputFormat) Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModel<T>)
PredictProbabilitiesCore(Matrix<Double>, Matrix<Double>, Boolean) Predicts the probabilities of each class based on the specified values of the features.
(Overrides ClassificationModel<T>.PredictProbabilitiesCore(Matrix<T>, Matrix<Double>, Boolean))
PredictProbabilitiesCore(Vector<Double>, Vector<Double>, Boolean) Predicts the probabilities of each class based on the specified values of the features.
(Overrides ClassificationModel<T>.PredictProbabilitiesCore(Vector<T>, Vector<Double>, Boolean))
PredictProbabilitiesInto(IDataFrame, Matrix<Double>, ModelInputFormat) Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModel<T>)
PredictProbabilitiesInto(Matrix<T>, Matrix<Double>, ModelInputFormat) Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModel<T>)
PredictProbabilitiesInto(Vector<T>, Vector<Double>, ModelInputFormat) Predicts the probabilities of each class based on the specified features.
(Inherited from ClassificationModel<T>)
ResetComputation Clears all fitted model parameters.
(Inherited from Model)
Obsolete.
ResetFit Clears all fitted model parameters.
(Inherited from Model)
SetDataSource Uses the specified data frame as the source for all input variables.
(Inherited from Model)
Summarize() Returns a string containing a human-readable summary of the object using default options.
(Inherited from Model)
Summarize(SummaryOptions) Returns a string containing a human-readable summary of the object using the specified options.
(Overrides Model.Summarize(SummaryOptions))
ToStringReturns a string that represents the current object.
(Inherited from Model)

See Also