ml

Logistic Regression

Gradient descent logistic regression from scratch — log loss curve, confusion matrix, decision boundary (2-feature mode), accuracy, precision, recall, F1.

Presets
Hyperparameters
Training Data
x₁x₂y
Did not converge in 1000 iterations — try larger α or more iterations
Log Loss Curve (1000 iterations)
Decision Boundary (x₁ vs x₂)
● class 1● class 0--- boundary
Model Coefficients
β₀ (bias)-5.988
β1 (x1)1.102
β2 (x2)1.255
Training
Final log loss0.06519
Iterations1000
Gradient norm0.02477
Classification (threshold 0.5)
Accuracy1
Precision1
Recall1
F11
TP3
FP0
FN0
TN3
Per-Row Predictions
#yP(1)ŷ
100.084970
200.12990
310.94721
410.94321
500.043920
610.99471
h(x) = σ(β₀ + β₁x₁ + … )  ·  J = -1/n Σ[y·log(h)+(1-y)·log(1-h)]