https://github.com/msikorski93/logistic-regression-classifier-from-scratch
Logistic regression created in Python for binary classification.
https://github.com/msikorski93/logistic-regression-classifier-from-scratch
binary-classification from-scratch logistic-regression python wbcd
Last synced: 3 months ago
JSON representation
Logistic regression created in Python for binary classification.
- Host: GitHub
- URL: https://github.com/msikorski93/logistic-regression-classifier-from-scratch
- Owner: msikorski93
- Created: 2024-09-30T13:53:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-28T12:51:22.000Z (9 months ago)
- Last Synced: 2025-05-21T18:32:46.482Z (5 months ago)
- Topics: binary-classification, from-scratch, logistic-regression, python, wbcd
- Language: Jupyter Notebook
- Homepage:
- Size: 570 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logistic-Regression-Classifier-From-Scratch




Logistic regression with the ability of implementing penalty terms. The class object is dedicated to binary classification and is compatible with `scikit-learn`'s GridSearchCV method.
An example of its usage was performed on the WBCD dataset and returned the following estimates:
* Accuracy: 0.9883
* Recall: 0.9841
* Precision: 0.9841
* Error Rate: 0.0117
* F1 Score: 0.9841
* ROC: 0.9874
* Specificity: 0.9907
* Misclassified Samples: 2 (out of 171)
**Code example:**
```
from logistic_regression import LogisticRegressionlog_model = LogisticRegression(learning_rate=0.01, C=0.1, num_iter=20, penalty='elasticnet', l1_ratio=0.7)
log_model.fit(X_train, y_train)predictions = log_model.predict(X_test, threshold=0.6)
```