Package edu.cmu.tetrad.regression
Class LogisticRegression
java.lang.Object
edu.cmu.tetrad.regression.LogisticRegression
- All Implemented Interfaces:
TetradSerializable
,Serializable
Implements a logistic regression algorithm based on a Javascript implementation by John Pezzullo. That
implementation together with a description of logistic regression and some examples appear on his web page
...
See also Applied Logistic Regression, by D.W. Hosmer and S. Lemeshow. 1989, John Wiley and Sons, New York which Pezzullo references. In particular see pages 27-29.
- Version:
- $Id: $Id
- Author:
- Frank Wimberly
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The result of a logistic regression. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getAlpha()
Getter for the fieldalpha
.regress
(DiscreteVariable x, List<Node> regressors) x must be binary; regressors must be continuous or binary.static LogisticRegression
Generates a simple exemplar of this class to test serialization.void
setAlpha
(double alpha) Sets the alpha level.void
setRows
(int[] rows) Setter for the fieldrows
.
-
Constructor Details
-
LogisticRegression
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
LogisticRegression
object
-
regress
x must be binary; regressors must be continuous or binary.- Parameters:
x
- aDiscreteVariable
objectregressors
- aList
object- Returns:
- a
LogisticRegression.Result
object
-
getAlpha
public double getAlpha()Getter for the field
alpha
.- Returns:
- the alpha level.
-
setAlpha
public void setAlpha(double alpha) Sets the alpha level.- Parameters:
alpha
- a double
-
setRows
public void setRows(int[] rows) Setter for the field
rows
.- Parameters:
rows
- an array of objects
-