lewtun/titanic
Viewer • Updated • 1.31k • 160
How to use muhammadmaaz724/titanic-survival-predictor with Scikit-learn:
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
hf_hub_download("muhammadmaaz724/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.htmlThis model predicts whether a passenger survived the Titanic disaster based on their passenger information.
| Metric | Value |
|---|---|
| Accuracy | 0.8156 |
| F1 Score | 0.7481 |
| Precision | 0.7903 |
| Recall | 0.7101 |
The most important features for prediction are:
import pickle
with open("titanic_xgb_model.pkl", "rb") as f:
data = pickle.load(f)
model = data["model"]
le_sex = data["le_sex"]
le_embarked = data["le_embarked"]
le_title = data["le_title"]
# See inference.py for full prediction function
Dataset: https://huggingface.co/datasets/lewtun/titanic
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.