How iamdiwakaryan/ann_project works
Project Type and Purpose
• This is a data-science / machine-learning pipeline project (“ann_project”) that trains and serves two neural-network models:
• A classification model (churn prediction)
• A regression model (salary prediction)
• The project includes raw data, preprocessing artifacts, training notebooks, TensorBoard logs, serialized model files, and an inference application (app.py).
File Structure Analysis
• Top-level artifacts:
• Churn_Modelling.csv – raw dataset for churn classification
• main.ipynb, salaryregression.ipynb, prediction.ipynb – Jupyter notebooks for EDA, model training, and prediction workflow
• Preprocessing pickles: label_encoder.pkl, onehotencoder.pkl, scaler.pkl (classification) and their _reg counterparts (regression)
• Trained models: model.h5 (classification), regerssion_model.h5 & regerssion_model.keras (regression)
• Logs: logs/fit* directories containing TensorBoard event files for training and validation runs
• app.py – inference script or micro-API
• requirements.txt – Python dependencies
Key Components
a. Data Ingestion
– Source: Churn_Modelling.csv
– Read by notebooks or app.py for batch training or live inference
b. Preprocessing Module
– Loads LabelEncoder, OneHotEncoder, StandardScaler pickles
– Transforms raw inputs into model-ready tensors
c. Training Pipelines
– Classification pipeline in main.ipynb → outputs model.h5 + TensorBoard logs under logs/fit*
– Regression pipeline in salaryregression.ipynb → outputs regerssion_model.h5/.keras + logs
d. Model & Artifact Storage
– File-system bucket or local directory holding .h5, .keras, and .pkl files
e. Inference Service (app.py)
– Loads saved preprocessing artifacts and model files
– Exposes API or CLI endpoints for realtime predictions
f. Monitoring & Visualization
– TensorBoard reading from logs/fit* for training/validation metrics
Relationships & Data Flow
1) CSV data → Preprocessing → Model training
2) During training → Metrics emitted to TensorBoard logs
3) Trained model + preprocessors → persisted to disk
4) Inference service loads preprocessors & model → accepts new input → returns prediction
Architectural Patterns & Technologies
• Batch pipeline pattern for model training
• Artifact repository pattern for model/version management
• Frameworks: Python, TensorFlow/Keras for modeling; scikit-learn for preprocessing; TensorBoard for logging; Flask/FastAPI or pure script for app.py
• Storage: local filesystem for data, artifacts, and logs