chrstnv/titanic
Viewer • Updated • 1.31k • 62
How to use chrstnv/titanic-survival with Scikit-learn:
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
hf_hub_download("chrstnv/titanic-survival", "sklearn_model.joblib")
)
# only load pickle files from sources you trust
# read more about it here https://skops.readthedocs.io/en/stable/persistence.htmlRandomForest (sklearn Pipeline: препроцессинг + классификатор в одном артефакте).
Учебный проект.
import joblib, pandas as pd
from huggingface_hub import hf_hub_download
model = joblib.load(hf_hub_download("chrstnv/titanic-survival", "model.joblib"))
feats = ["Pclass", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]
model.predict(pd.read_csv("test.csv")[feats]) # принимает сырые данные
Обучена на chrstnv/titanic. Validation accuracy: 0.8156.