Update README.md
Browse files
README.md
CHANGED
|
@@ -12,9 +12,61 @@ short_description: Predict if a passenger was transported in the SpaceshipTitan
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# 🚀 Spaceship Titanic - Transported Predictor
|
| 16 |
|
| 17 |
+
This Streamlit app predicts whether a passenger was **Transported** to another dimension (True/False) based on passenger features from the Kaggle **Spaceship Titanic** dataset.
|
| 18 |
|
| 19 |
+
## What this app does
|
| 20 |
+
- Single passenger prediction using an easy form
|
| 21 |
+
- Batch prediction by uploading a CSV file
|
| 22 |
+
- Outputs predictions in the same True/False style as Kaggle submissions
|
| 23 |
+
|
| 24 |
+
## Model
|
| 25 |
+
- Gradient Boosting Classifier (scikit-learn)
|
| 26 |
+
- Validation accuracy around **0.79** (your current result)
|
| 27 |
+
|
| 28 |
+
## Files in this repository
|
| 29 |
+
- `app.py` : Streamlit app
|
| 30 |
+
- `requirements.txt` : Python dependencies
|
| 31 |
+
- `spaceship_titanic_gb.pkl` : saved model artifact (required)
|
| 32 |
+
|
| 33 |
+
## Important: Required model artifact
|
| 34 |
+
The app expects this file in the repo root:
|
| 35 |
+
|
| 36 |
+
- `spaceship_titanic_gb.pkl`
|
| 37 |
+
|
| 38 |
+
Create it in your notebook with:
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
import joblib
|
| 42 |
+
|
| 43 |
+
joblib.dump(
|
| 44 |
+
{
|
| 45 |
+
'model': gb,
|
| 46 |
+
'feature_columns': x.columns.tolist()
|
| 47 |
+
},
|
| 48 |
+
'spaceship_titanic_gb.pkl'
|
| 49 |
+
)
|
| 50 |
+
This makes the app safe because it uses the same one-hot encoded feature columns as training.
|
| 51 |
+
|
| 52 |
+
How to run locally
|
| 53 |
+
bash
|
| 54 |
+
Code kopieren
|
| 55 |
+
pip install -r requirements.txt
|
| 56 |
+
streamlit run app.py
|
| 57 |
+
Batch CSV format
|
| 58 |
+
Recommended columns:
|
| 59 |
+
|
| 60 |
+
PassengerId (optional, will be kept in output)
|
| 61 |
+
|
| 62 |
+
HomePlanet, Destination, Deck, Side
|
| 63 |
+
|
| 64 |
+
CryoSleep, VIP (values: True / False / Unknown)
|
| 65 |
+
|
| 66 |
+
Age
|
| 67 |
+
|
| 68 |
+
RoomService, FoodCourt, ShoppingMall, Spa, VRDeck
|
| 69 |
+
|
| 70 |
+
GroupSize
|
| 71 |
+
|
| 72 |
+
If some columns are missing, the app will try to fill defaults.
|