Titanic Survival Prediction

  • This is a RandomForest model trained on Kaggle's Titanic dataset.
  • It predicts whether a passenger survived or not.

Model Accuracy:

  • Accuracy: ~ 81.58 (test set)

Features

  • Pclass
  • Sex
  • Age
  • SibSp
  • Parch
  • Fare
  • Embarked
  • FamilySize
  • IsAlone

Usage

import joblib
import pandas as pd

# Load the model
model = joblib.load('titanic_model.pkl')

# Prepare input data
X_new = pd.DataFrame({
    'Pclass':[3],
    'Sex':[0],
    'Age':[22],
    'SibSp':[1],
    'Parch':[0],
    'Fare':[7.25],
    'Embarked':[2],
    'FamilySize':[2],
    'IsAlone':[0]

})

## Make prediction
prediction = model.predict(X_new)
print("Survived" if prediction[0]==1 else "Not Survived")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support