Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference

Skip Navigation LinksHome»Documentation»Reference»Extreme.Statistics»LogisticRegressionModel Class

LogisticRegressionModel Class

Extreme Optimization Numerical Libraries for .NET Professional
Represents a logistic regression model.
Inheritance Hierarchy

SystemObject
  Extreme.DataAnalysis.ModelsModel
    Extreme.DataAnalysis.ModelsClassificationModelDouble
      Extreme.StatisticsLogisticRegressionModel

Namespace:  Extreme.Statistics
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public class LogisticRegressionModel : ClassificationModel<double>
Public Class LogisticRegressionModel
	Inherits ClassificationModel(Of Double)
public ref class LogisticRegressionModel : public ClassificationModel<double>
type LogisticRegressionModel =  
    class
        inherit ClassificationModel<float>
    end

The LogisticRegressionModel type exposes the following members.

Constructors

  NameDescription
Public methodLogisticRegressionModel(ICategoricalVector, VectorDouble)
Constructs a new LogisticRegressionModel.
Public methodLogisticRegressionModel(IDataFrame, String)
Constructs a new LogisticRegressionModel.
Public methodLogisticRegressionModel(IDataFrame, String, String)
Constructs a new LogisticRegressionModel.
Public methodLogisticRegressionModel(VectorDouble, MatrixDouble, VectorDouble)
Constructs a new SimpleRegressionModel.
Public methodLogisticRegressionModel(ICategoricalVector, VectorDouble, VectorDouble, LogisticRegressionMethod)
Constructs a new LogisticRegressionModel.
Public methodLogisticRegressionModel(ModelInput, IIndex, VectorDouble, SymmetricMatrixDouble, Int32, Double)
Constructs a fitted logistic regression model.
Top
Properties

  NameDescription
Public propertyBaseFeatureIndex
Gets an index containing the keys of the columns that are required inputs to the model.
(Inherited from Model.)
Public propertyCanPredictProbabilities
Gets whether the classifier supports predicting probabilities for each class.
(Inherited from ClassificationModelT.)
Public propertyCategoryIndex
Gets the category index of the dependent variable or targets.
(Inherited from ClassificationModelT.)
Public propertyComputed Obsolete.
Gets whether the model has been computed.
(Inherited from Model.)
Public propertyConvergenceStatus
Gets the convergence status of the algorithm that computes the model parameters.
Public propertyCovarianceMatrix Obsolete.
Gets the covariance matrix of the model parameters.
Public propertyData
Gets an object that contains all the data used as input to the model.
(Inherited from Model.)
Public propertyDependentVariable
Gets a vector that contains the dependent variable that is to be fitted.
(Inherited from ClassificationModelT.)
Public propertyFitted
Gets whether the model has been computed.
(Inherited from Model.)
Public propertyIndependentVariables
Gets a matrix whose columns contain the independent variables in the model.
(Inherited from ClassificationModelT.)
Public propertyInputSchema
Gets the schema for the features used for fitting the model.
(Inherited from Model.)
Public propertyLogLikelihood
Gets the log-likelihood of the fitted model.
Public propertyMaxDegreeOfParallelism
Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from Model.)
Public propertyMethod
Gets or sets the kind of logistic regression represented by this LogisticRegressionModel.
Public propertyModelSchema
Gets the collection of variables used in the model.
(Inherited from Model.)
Public propertyNumberOfObservations
Gets the number of observations the model is based on.
(Inherited from Model.)
Protected propertyParallelOptions
Gets or sets an object that specifies how the calculation of the model should be parallelized.
(Inherited from Model.)
Public propertyParameters
Gets the collection of parameters associated with this model.
Public propertyParameterValues
Gets the collection of parameters associated with this model.
Public propertyPredictedLogProbabilities
Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModelT.)
Public propertyPredictedProbabilities
Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModelT.)
Public propertyPredictions
Gets a vector containing the model's predicted values for the dependent variable.
(Inherited from ClassificationModelT.)
Public propertyProbabilityResiduals
Gets a matrix containing the residuals of the model.
(Inherited from ClassificationModelT.)
Public propertyStatus
Gets the status of the model, which determines which information is available.
(Inherited from Model.)
Public propertySupportsWeights
Indicates whether the model supports case weights.
(Inherited from Model.)
Public propertyWeights
Gets or sets the actual weights.
(Inherited from Model.)
Top
Methods

  NameDescription
Public methodCompute Obsolete.
Computes the model.
(Inherited from Model.)
Public methodCompute(ParallelOptions) Obsolete.
Computes the model.
(Inherited from Model.)
Public methodContains
Returns whether another ClassificationModelT is nested within this instance.
(Inherited from ClassificationModelT.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFit
Fits the model to the data.
(Inherited from Model.)
Public methodFit(ParallelOptions)
Fits the model to the data.
(Inherited from Model.)
Protected methodFitCore
Fits the model to the data.
(Overrides ModelFitCore(ModelInput, ParallelOptions).)
Public methodGetAkaikeInformationCriterion
Returns the Akaike information criterion (AIC) value for the model.
Public methodGetBaseLogLikelihood
Returns the log-likelihood of the model containing only a constant term.
Public methodGetBayesianInformationCriterion
Returns the Bayesian information criterion (BIC) value for the model.
Public methodGetCoxAndSnellPseudoRSquared
Returns the Cox & Snell pseudo R-squared value of the model.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetInformationMatrix
Calculates the information matrix for the regression.
Public methodGetLikelihoodRatioTest
Returns a test to verify the significance of the logistic model.
Public methodGetLikelihoodRatioTest(LogisticRegressionModel)
Returns a test to verify the significance of the logistic model.
Public methodGetMcFaddenPseudoRSquared
Returns the McFadden pseudo R-squared value of the model.
Public methodGetNagelkerkePseudoRSquared
Returns the Nagelkerke pseudo R-squared value of the model.
Public methodGetPearsonGoodnessOfFitTest
Returns the Wald test for all the parameters in the regression.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWaldTest
Returns the Wald test for all the parameters in the regression.
Public methodGetWaldTest(Int32)
Returns the Wald test for the selected parameters in the regression.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPredict(IDataFrame, ModelInputFormat)
Predicts the most likely class based on the specified features.
(Inherited from ClassificationModelT.)
Public methodPredict(MatrixT, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModelT.)
Public methodPredict(VectorT, ModelInputFormat)
Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModelT.)
Protected methodPredictCore(MatrixDouble, Boolean)
Predicts the value of the dependent variable based on the specified values of the features.
(Overrides ClassificationModelTPredictCore(MatrixT, Boolean).)
Protected methodPredictCore(VectorDouble, Boolean)
Predicts the class based on the specified values of the features.
(Overrides ClassificationModelTPredictCore(VectorT, Boolean).)
Public methodPredictProbabilities(IDataFrame, ModelInputFormat)
Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModelT.)
Public methodPredictProbabilities(MatrixT, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModelT.)
Public methodPredictProbabilities(VectorT, ModelInputFormat)
Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModelT.)
Protected methodPredictProbabilitiesCore(MatrixDouble, MatrixDouble, Boolean)
Predicts the probabilities of each class based on the specified values of the features.
(Overrides ClassificationModelTPredictProbabilitiesCore(MatrixT, MatrixDouble, Boolean).)
Protected methodPredictProbabilitiesCore(VectorDouble, VectorDouble, Boolean)
Predicts the probabilities of each class based on the specified values of the features.
(Overrides ClassificationModelTPredictProbabilitiesCore(VectorT, VectorDouble, Boolean).)
Public methodPredictProbabilitiesInto(IDataFrame, MatrixDouble, ModelInputFormat)
Predicts the value of the output corresponding to the specified input.
(Inherited from ClassificationModelT.)
Public methodPredictProbabilitiesInto(MatrixT, MatrixDouble, ModelInputFormat)
Predicts the value of the output corresponding to the specified features.
(Inherited from ClassificationModelT.)
Public methodPredictProbabilitiesInto(VectorT, VectorDouble, ModelInputFormat)
Predicts the probabilities of each class based on the specified features.
(Inherited from ClassificationModelT.)
Public methodResetComputation Obsolete.
Clears all fitted model parameters.
(Inherited from Model.)
Public methodResetFit
Clears all fitted model parameters.
(Inherited from Model.)
Public methodSetDataSource
Uses the specified data frame as the source for all input variables.
(Inherited from Model.)
Public methodSummarize
Returns a string containing a human-readable summary of the object using default options.
(Inherited from Model.)
Public methodSummarize(SummaryOptions)
Returns a string containing a human-readable summary of the object using the specified options.
(Overrides ModelSummarize(SummaryOptions).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Model.)
Top
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.

See Also

Reference

Extreme.Statistics Namespace
Extreme.StatisticsLinearRegressionModel
Extreme.StatisticsGeneralizedLinearModel

Copyright (c) 2004-2023 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2023, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.