![]() | Logistic |
[SerializableAttribute] public class LogisticRegression<ParameterCalc> : RegressionBase, ICloneable where ParameterCalc : new(), ILogisticRegressionCalc
The LogisticRegressionParameterCalc type exposes the following members.
Name | Description | |
---|---|---|
![]() | LogisticRegressionParameterCalc | Default constructor. Constructs a LogisticRegression instance with all sizes equal to zero. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, IListBoolean, Boolean) | Constructs a LogisticRegression instance with the specifed regresssion matrix and observation vector, optionally adding an intercept parameter. The model parameter values are computed using the specified regression calculator. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, DoubleVector, PredicateDouble, Boolean) | Constructs a LogisticRegression instance with the specifed regresssion matrix and observation vector, optionally adding an intercept parameter. The vector of floating point observations is converted to a vector of booleans by applying the give predicate function. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, IListBoolean, Boolean, ParameterCalc) | Constructs a LogisticRegression instance with the specifed regresssion matrix and observation vector, optionally adding an intercept parameter. The model parameter values are computed using the specified regression calculator. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, Int32, PredicateDouble, Boolean) | Constructs a LogisticRegression instance optionally adding an intercept parameter. The provided matrix of values contains the observation values as one of its columns. The rest of the columns of the matrix forms the regression matrix. The floating point observation value in the matrix are converted to a vector of dichotomous values by applying the give predicate function. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, DoubleVector, PredicateDouble, Boolean, ParameterCalc) | Constructs a LogisticRegression instance with the specifed regresssion matrix and observation vector, optionally adding an intercept parameter. The vector of floating point observations is converted to a vector of booleans by applying the give predicate function. |
![]() | LogisticRegressionParameterCalc(DoubleMatrix, Int32, PredicateDouble, Boolean, ParameterCalc) | Constructs a LogisticRegression instance optionally adding an intercept parameter. The provided matrix of values contains the observation values as one of its columns. The rest of the columns of the matrix forms the regression matrix. The floating point observation value in the matrix are converted to a vector of dichotomous values by applying the give predicate function. |
Name | Description | |
---|---|---|
![]() | ColumnResizeIncrement |
Gets and sets the amount by which the regression matrix is resized
if columns are added.
(Inherited from RegressionBase) |
![]() | HasInterceptParameter |
Returns true if the model has an intercept parameter; otherwise,
false.
(Inherited from RegressionBase) |
![]() | Intercept |
Gets the intercept.
(Inherited from RegressionBase) |
![]() | IsGood |
Returns true if the model parameters were successfuly computed;
otherwise, false.
(Inherited from RegressionBase) |
![]() | NumberOfObservations |
Gets the number of observations.
(Inherited from RegressionBase) |
![]() | NumberOfParameters |
Gets the number of parameters in the model.
(Inherited from RegressionBase) |
![]() | NumberOfPredictors |
Gets the number of predictors.
(Inherited from RegressionBase) |
![]() | Observations |
Gets the vector of observations.
(Inherited from RegressionBase) |
![]() | ParameterCalculationErrorMessage |
Gets the error message associated with a failed parameter calculation.
(Inherited from RegressionBase) |
![]() | ParameterCalculator | Gets the parameter calculation object. |
![]() | ParameterCovarianceMatrix | Gets the covariance matrix for the parameters. The entry at column i, row j is the covariance between the ith and jth parameters. |
![]() | ParameterEstimates | Gets the array of parameter estimate objects. |
![]() | Parameters |
Gets the computed model parameters.
(Inherited from RegressionBase) |
![]() | PredictorMatrix |
Gets the predictor matrix.
(Inherited from RegressionBase) |
![]() | RegressionMatrix |
Gets the regression matrix.
(Inherited from RegressionBase) |
![]() | RowResizeIncrement |
Gets and sets the amount by which the regression matrix is resized
if rows are added.
(Inherited from RegressionBase) |
Name | Description | |
---|---|---|
![]() | AddInterceptParameter |
Adds an intercept parameter to the model and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | AddObservation |
Adds the given observation to the model, and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | AddObservations |
Adds the given observations to the model, and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | AddPredictor |
Adds a predictor to the model, and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | AddPredictors |
Adds predictors to the model, and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | Clone | Creates a deep copy of this LogisticRegression. |
![]() ![]() | DesignVariables(IDFColumn) | Convenience method for generating design, or dummy, variables which replace independent variables in a logistic model that take on discrete, nominal scaled values. The encoding method used is "reference cell coding". where the group with the SMALLEST code serves as the reference group. The method is described in the remark below. |
![]() ![]() | DesignVariables(IDFColumn, IComparable) | Convenience method for generating design, or dummy, variables which replace independent variables in a logistic model that take on discrete, nominal scaled values. The encoding method used is "reference cell coding" with the group with the speficied code serves as the reference group. The method is described in the remark below. |
![]() ![]() | LogLikelihood | Computes the value of the log likelihood function for a binomial logistic regression model with the given predictor variable values, probabilities and observed dichotomous outcomes. |
![]() | ObservationVarianceEstimates | Computes the variance estimate for each observation. if pi is the probability of success predicted by the model for the ith observation, then the estimated variance for the ith observation is pi*(1.0 - pi). |
![]() | PredictedProbabilities(DoubleMatrix) | Returns a vector of predicted probabilities of a positive outcome for the predictor variable values contained in the rows of the input matrix A. |
![]() ![]() | PredictedProbabilities(DoubleMatrix, DoubleVector, Boolean) | Returns a vector of predicted probabilities of a positive outcome for the predictor variable values contained in the rows of the input matrix A. |
![]() | PredictedProbability(DoubleVector) | Returns the probability of a positive outcome predicted by the model for the given set of predictor values. |
![]() ![]() | PredictedProbability(DoubleVector, DoubleVector, Boolean) | Returns the probability of a positve outcome predicted by the model for the given set of predictor values. |
![]() | RecalculateParameters |
Recalculates the model parameters.
(Overrides RegressionBaseRecalculateParameters) |
![]() | RemoveInterceptParameter |
Removes the intercept parameter from the model, and recalculates the model parameters.
(Inherited from RegressionBase) |
![]() | RemoveObservation |
Removes the row at the indicated index from the predictor matrix and the
corresponding element from the observation vector, and recalculates the model
parameters.
(Inherited from RegressionBase) |
![]() | RemoveObservations |
Removes the specified rows from the predictor matrix, and recalculates the model
parameters.
(Inherited from RegressionBase) |
![]() | RemovePredictor |
Removes the specified predictor from the model, and recalculates the
model parameters.
(Inherited from RegressionBase) |
![]() ![]() | RemovePredictors |
Removes the specified predictors from the model, and recalculates the model
parameters.
(Inherited from RegressionBase) |
![]() | SetRegressionData | Sets the regression matrix, observation vector, and intercept option to the specified values, and recalculates the model parameters. |
Name | Description | |
---|---|---|
![]() | colResizeIncrement_ |
Number of columns to add when adding variables (if needed).
(Inherited from RegressionBase) |
![]() | errorMessage_ |
Explains errors, if any.
(Inherited from RegressionBase) |
![]() | hasIntercept_ |
Does the model have an intercept parameter?
(Inherited from RegressionBase) |
![]() | isGood_ |
Is the regression good?
(Inherited from RegressionBase) |
![]() | observationData_ |
Full set of observations.
(Inherited from RegressionBase) |
![]() | observations_ |
Subvector of the observation data used in the current regression model.
observations_ = observationData_[regMatRowSlice_].
(Inherited from RegressionBase) |
![]() | parameters_ |
Model parameters.
(Inherited from RegressionBase) |
![]() | regMatColSlice_ |
regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
(Inherited from RegressionBase) |
![]() | regMatRowSlice_ |
regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
(Inherited from RegressionBase) |
![]() | regressionData_ |
The full set of regression data.
(Inherited from RegressionBase) |
![]() | regressionMatrix_ |
A submatrix of the regression used in this regression
model.
regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
(Inherited from RegressionBase) |
![]() | rowResizeIncrement_ |
Number of rows to add when adding observations (if needed).
(Inherited from RegressionBase) |