How dev-nikhil02/war-of-survival works
Project type and purpose
• This is an end-to-end machine-learning classification web app built on the Titanic Kaggle dataset.
• It consists of two major phases: a Training phase (data exploration, feature engineering, model training) and a Deployment phase (packaged model served via a Streamlit UI).
File structure
Top-level directories:
• .devcontainer: local VS Code/container setup
• Training: Jupyter notebooks + raw CSVs for model building
• Deployment: Streamlit app code plus saved model and scaler pickles
• assests: images (feature importance, confusion matrix)
• readme.md: project overview
Key files:
• Training/Titanic_Survival_Prediction.ipynb – end-to-end ML notebook
• Deployment/app.py – Streamlit application entry point
• Deployment/random_forest_model_titanic.pkl, scaler.pkl – serialized artifacts
• Deployment/requirements.txt – deployment dependencies
README for additional insights
• Algorithm: Random Forest with MinMaxScaler
• Hyperparameter tuning via RandomizedSearchCV, 5-fold CV
• Deployment platform: Streamlit (optionally Streamlit Cloud)
• Inputs: Age, Fare, FamilySize, Pclass, Sex, Embarked, Title → scaled → model → prediction
a. Main components
1. Data Storage:
• Raw CSVs (train.csv, test.csv) in the Training folder
2. Preprocessing & Feature Engineering:
• Notebook cell blocks or modularized scripts (impute, encode, scale)
3. Model Training Pipeline:
• Random Forest training block, hyperparameter tuning, cross-validation
4. Artifact Storage:
• Serialized model (random_forest_model_titanic.pkl)
• Serialized scaler (scaler.pkl)
5. Deployment Environment:
• Docker/.devcontainer for reproducible dev environment
• Streamlit app (app.py) served on local host or Streamlit Cloud
6. User Interface (Streamlit UI):
• Input widgets → sends feature vector to inference module → displays result
7. External Services (optional):
• Streamlit Cloud hosting
• GitHub repo for CI/CD (if any)
b. Relationships and interactions
• Data Storage → Preprocessing → Model Training → Artifact Storage
• Artifact Storage → Deployment Environment → Streamlit UI
• User Input (UI) → Scaler → Model → Prediction → UI output
• Dev container → ensures identical env for both Training and Deployment
c. Architectural patterns / design principles
• Separation of concerns: training vs. serving
• Reproducibility: containerized environment (.devcontainer), pinned requirements
• Modular ML pipeline: distinct stages (extract, transform, train, serialize, serve)
d. Key technologies & libraries
• Python, Jupyter Notebook for training
• pandas, scikit-learn (RandomForestClassifier, MinMaxScaler, RandomizedSearchCV)
• joblib for serialization
• Streamlit for web UI
• Docker/VS Code Dev Containers for environment consistency