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
model = joblib.load('titanic_model.pkl')
X_new = pd.DataFrame({
'Pclass':[3],
'Sex':[0],
'Age':[22],
'SibSp':[1],
'Parch':[0],
'Fare':[7.25],
'Embarked':[2],
'FamilySize':[2],
'IsAlone':[0]
})
prediction = model.predict(X_new)
print("Survived" if prediction[0]==1 else "Not Survived")