| LogisticRegressionParameterCalc(DoubleMatrix, DoubleVector, PredicateDouble, Boolean) Constructor |
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.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public LogisticRegression(
DoubleMatrix A,
DoubleVector obs,
Predicate<double> obsPred,
bool addIntercept
)
Public Sub New (
A As DoubleMatrix,
obs As DoubleVector,
obsPred As Predicate(Of Double),
addIntercept As Boolean
)
public:
LogisticRegression(
DoubleMatrix^ A,
DoubleVector^ obs,
Predicate<double>^ obsPred,
bool addIntercept
)
new :
A : DoubleMatrix *
obs : DoubleVector *
obsPred : Predicate<float> *
addIntercept : bool -> LogisticRegression
Parameters
- A DoubleMatrix
- A regression matrix, a row for each set of predictor variable
values.
- obs DoubleVector
- A vector of observations as floating point values. This
vector is converted to dichotomous values using the supplied predicate
function.
- obsPred PredicateDouble
- Rule for converting the floating point values in the
vector of observations to dichotomous value.
- addIntercept Boolean
- If true, a column of ones is prepended onto
the data in the regression matrix A, thus adding an intercept to
the model. If false, the data in the regression matrix is used as given.
Exceptions Exception | Condition |
---|
MismatchedSizeException | Thrown if the number of rows
in the regression matrix is not equal to the length of the observation
vector.
|
See Also