BivariateLinearLogisticRegression Method |
Computes the best-fit linear logistic regression from the data.
Namespace:
Meta.Numerics.Statistics
Assembly:
Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax public static LinearLogisticRegressionResult LinearLogisticRegression(
this IReadOnlyList<bool> y,
IReadOnlyList<double> x
)
<ExtensionAttribute>
Public Shared Function LinearLogisticRegression (
y As IReadOnlyList(Of Boolean),
x As IReadOnlyList(Of Double)
) As LinearLogisticRegressionResult
public:
[ExtensionAttribute]
static LinearLogisticRegressionResult^ LinearLogisticRegression(
IReadOnlyList<bool>^ y,
IReadOnlyList<double>^ x
)
[<ExtensionAttribute>]
static member LinearLogisticRegression :
y : IReadOnlyList<bool> *
x : IReadOnlyList<float> -> LinearLogisticRegressionResult
Parameters
- y
- Type: System.Collections.GenericIReadOnlyListBoolean
The values of the dependent variable. - x
- Type: System.Collections.GenericIReadOnlyListDouble
The values of the independent variable.
Return Value
Type:
LinearLogisticRegressionResultThe fit result.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IReadOnlyListBoolean. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Remarks Linear logistic regression is a way to fit binary outcome data to a linear model.
The method assumes that binary outcomes are encoded as 0 and 1. If any y-values other than
0 and 1 are encountered, it throws an InvalidOperationException.
The fit result is two-dimensional. The first parameter is a, the second b.
See Also