How mohamednihmath18/diamond-dynamics works
Diamond Dynamics is a Streamlit application for diamond price prediction, market segmentation, and visual summaries, backed by trained ML artifacts and processed diamond data. Its documented development workflow moves from preprocessing and exploration through feature engineering, regression/ANN modeling, and clustering; users enter diamond attributes to obtain prices or a segment, while the dashboard summarizes stored segment data. The app implementation is excerpted; notebook-stage links follow the README pipeline, which documents these capabilities but does not establish every implementation detail.
Main entry points: diamonds_engineered.csv Engineered Data · app.py Streamlit Application · 01_data_preprocessing.ipynb Preprocessing · diamonds_clean.csv Clean Data
Components 21
Data Workflow
- Raw Diamonds
data/diamonds.csv - Preprocessing
notebooks/01_data_preprocessing.ipynb - Clean Data
data/diamonds_clean.csv - Exploratory Analysis
notebooks/02_eda.ipynb - Feature Engineering
notebooks/03_feature_engineering.ipynb - Engineered Data
data/diamonds_engineered.csv
Modeling
- Regression Models
notebooks/04_regression_models.ipynb - ANN Model
notebooks/05_ann_model.ipynb - K-Means Segmentation
notebooks/06_clustering.ipynb
Streamlit App
- Streamlit Application
app/app.py - Price Prediction
app/app.py - Segment Prediction
app/app.py - Visual Insights
app/app.py
Runtime Data
- Segmented Data
data/diamonds_final.csv - Price Model
models/xgb_model.pkl - Cluster Model
models/kmeans_model.pkl - Feature Scalers
models/scaler.pkl - Cluster Scaler
models/scaler_cluster.pkl - Segment Names
models/cluster_names.pkl
Other components
- Analyst
- App User
Connections 19
- Raw Diamonds → Preprocessing: cleans
README.md - Preprocessing → Clean Data: produces
README.md - Clean Data → Exploratory Analysis: analyzes
README.md - Exploratory Analysis → Feature Engineering: informs
README.md - Feature Engineering → Engineered Data: produces
README.md - Engineered Data → Regression Models: trains
README.md - Engineered Data → ANN Model: trains
README.md - Engineered Data → K-Means Segmentation: clusters
README.md - K-Means Segmentation → Segmented Data: labels
README.md - App User → Streamlit Application: uses
README.md - Streamlit Application → Price Prediction: shows
app/app.py - Streamlit Application → Segment Prediction: shows
app/app.py - Streamlit Application → Visual Insights: shows
app/app.py - Price Prediction → Feature Scalers: transforms input
app/app.py - Price Prediction → Price Model: predicts price
app/app.py - Segment Prediction → Cluster Scaler: transforms input
app/app.py - Segment Prediction → Cluster Model: predicts cluster
app/app.py - Segment Prediction → Segment Names: names cluster
app/app.py - Visual Insights → Segmented Data: reads summaries
app/app.py