Click or drag to resize

RegressionBase Class

Base class for linear and logistic regression.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public abstract class RegressionBase

The RegressionBase type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyColumnResizeIncrement
Gets and sets the amount by which the regression matrix is resized if columns are added.
Public propertyHasInterceptParameter
Returns true if the model has an intercept parameter; otherwise, false.
Public propertyIntercept
Gets the intercept.
Public propertyIsGood
Returns true if the model parameters were successfuly computed; otherwise, false.
Public propertyNumberOfObservations
Gets the number of observations.
Public propertyNumberOfParameters
Gets the number of parameters in the model.
Public propertyNumberOfPredictors
Gets the number of predictors.
Public propertyObservations
Gets the vector of observations.
Public propertyParameterCalculationErrorMessage
Gets the error message associated with a failed parameter calculation.
Public propertyParameters
Gets the computed model parameters.
Public propertyPredictorMatrix
Gets the predictor matrix.
Public propertyRegressionMatrix
Gets the regression matrix.
Public propertyRowResizeIncrement
Gets and sets the amount by which the regression matrix is resized if rows are added.
Top
Methods
  NameDescription
Public methodAddInterceptParameter
Adds an intercept parameter to the model and recalculates the model parameters.
Public methodAddObservation
Adds the given observation to the model, and recalculates the model parameters.
Public methodAddObservations
Adds the given observations to the model, and recalculates the model parameters.
Public methodAddPredictor
Adds a predictor to the model, and recalculates the model parameters.
Public methodAddPredictors
Adds predictors to the model, and recalculates the model parameters.
Protected methodStatic memberFirstColumnIsAllOnes(DFNumericColumn)
Checks if the given numeric column contains all 1's
Public methodStatic memberFirstColumnIsAllOnes(DoubleMatrix)
Convienence method for determining if the first column of a matrix is all ones.
Protected methodStatic memberFirstColumnIsAllOnes(DoubleVector)
Determine if the vector is all 1's
Public methodRecalculateParameters
Recalculates the model parameters.
Public methodRemoveInterceptParameter
Removes the intercept parameter from the model, and recalculates the model parameters.
Public methodRemoveObservation
Removes the row at the indicated index from the predictor matrix and the corresponding element from the observation vector, and recalculates the model parameters.
Public methodRemoveObservations
Removes the specified rows from the predictor matrix, and recalculates the model parameters.
Public methodRemovePredictor
Removes the specified predictor from the model, and recalculates the model parameters.
Public methodCode exampleRemovePredictors
Removes the specified predictors from the model, and recalculates the model parameters.
Top
Fields
  NameDescription
Protected fieldcolResizeIncrement_
Number of columns to add when adding variables (if needed).
Protected fielderrorMessage_
Explains errors, if any.
Protected fieldhasIntercept_
Does the model have an intercept parameter?
Protected fieldisGood_
Is the regression good?
Protected fieldobservationData_
Full set of observations.
Protected fieldobservations_
Subvector of the observation data used in the current regression model. observations_ = observationData_[regMatRowSlice_].
Protected fieldparameters_
Model parameters.
Protected fieldregMatColSlice_
regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
Protected fieldregMatRowSlice_
regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
Protected fieldregressionData_
The full set of regression data.
Protected fieldregressionMatrix_
A submatrix of the regression used in this regression model. regressionMatrx_ = regressionData_[regMatRowSlice_, regMatColSlice_]
Protected fieldrowResizeIncrement_
Number of rows to add when adding observations (if needed).
Top
See Also