Instructions to use arosfa/breast-cancer-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use arosfa/breast-cancer-classifier with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("arosfa/breast-cancer-classifier", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Breast Cancer Classifier — Ahmed Rosfa
Pipeline scikit-learn (imputation médiane + standardisation + régression logistique) qui classe une tumeur mammaire en Malin (1) / Bénin (0) à partir des 30 variables du jeu Breast Cancer Wisconsin.
Résultats (jeu de test, 20 %)
| métrique | valeur |
|---|---|
| accuracy | 0.965 |
| precision | 0.975 |
| recall | 0.929 |
| f1-score | 0.951 |
| ROC-AUC | 0.996 |
Meilleur modèle sélectionné par validation croisée (5-fold ROC-AUC) parmi LogisticRegression / RandomForest / SVM.
Utilisation
import joblib, pandas as pd
model = joblib.load("best_cancer_model_pipeline.joblib")
# df = DataFrame avec les 30 colonnes de features
pred = model.predict(df) # 0 = Bénin, 1 = Malin
proba = model.predict_proba(df)[:, 1]
Limites
Modèle pédagogique — usage non clinique.
- Downloads last month
- -