phihung/titanic
Viewer • Updated • 891 • 205 • 6
How to use Hyperion912/titanic-survival-predictor with Scikit-learn:
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
hf_hub_download("Hyperion912/titanic-survival-predictor", "sklearn_model.joblib")
)
# only load pickle files from sources you trust
# read more about it here https://skops.readthedocs.io/en/stable/persistence.htmlBinary classification model to predict passenger survival on the Titanic.
| Metric | CV Score | Test Score |
|---|---|---|
| Accuracy | 0.8104 | 0.8101 |
| F1 Score | 0.7450 | 0.7463 |
| AUC-ROC | 0.8913 | 0.8422 |
| Precision | - | 0.7692 |
| Recall | - | 0.7246 |
| Model | CV Accuracy | CV F1 | CV AUC | Test Accuracy | Test F1 | Test AUC |
|---|---|---|---|---|---|---|
| LogisticRegression | 0.8020 | 0.7402 | 0.8590 | 0.8045 | 0.7368 | 0.8594 |
| RandomForest | 0.8231 | 0.7569 | 0.8826 | 0.7877 | 0.7077 | 0.8473 |
| GradientBoosting 🏆 | 0.8104 | 0.7450 | 0.8913 | 0.8101 | 0.7463 | 0.8422 |
| XGBoost | 0.8146 | 0.7475 | 0.8892 | 0.8045 | 0.7328 | 0.8428 |
Engineered features from the raw Titanic dataset:
import joblib
import numpy as np
model = joblib.load("model.joblib")
scaler = joblib.load("scaler.joblib")
label_encoders = joblib.load("label_encoders.joblib")
# See config.json for feature_columns ordering
Trained on phihung/titanic (891 passengers, 80/20 train/test split, stratified).