Class LogisticRegression
java.lang.Object
org.episteme.core.mathematics.ml.LogisticRegression
Logistic Regression - binary classification using sigmoid function.
Model: P(y=1|x) = 1/(1 + e^(-w·x)) Training: Gradient descent on log-likelihood Applications: Classification, probability estimation
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTrains logistic regression model.voidfitWithRegularization(Real[][] X, Real[] y, Real lambda) L2 regularization (Ridge): adds λ||w||² to loss.getBias()Real[]Predicts class (0 or 1) using threshold 0.5.predictProba(Real[] x) Predicts probability P(y=1|x).Computes accuracy on test set.voidsetLearningRate(Real lr) voidsetMaxIterations(int iter)
-
Constructor Details
-
LogisticRegression
public LogisticRegression()
-
-
Method Details
-
fit
-
predictProba
-
predict
-
score
-
fitWithRegularization
-
setLearningRate
-
setMaxIterations
public void setMaxIterations(int iter) -
getWeights
-
getBias
-