All workStudy 06 / 06

Machine learning

Inflation Analyzer

Cost of Living Analytics – AI-Powered Forecast Platform

An end-to-end TensorFlow and Streamlit application for exploring India’s rural and urban Consumer Price Index, generating on-demand predictions, and comparing historical trends with model forecasts.

My role
Forecasting, preprocessing & dashboard development
Status
Completed · Infosys Springboard Milestone 1
Year
Not recorded yet
Note 01

From historical data to an interactive dashboard

Developed for Milestone 1 of Infosys Springboard Virtual Internship 6.0, Cost of Living Analytics connects a neural-network regression model with a Streamlit dashboard for India’s rural and urban Consumer Price Index (CPI). I developed the forecasting model, preprocessing pipeline, and dashboard.

Users select a year and month to generate separate rural and urban General Index predictions. The application uses a static historical dataset; on-demand inference does not mean it receives live economic data.

Note 02

Exploring predictions and trends

The Key Predictions tab presents rural and urban forecasts as Plotly gauges. Trend Analysis distinguishes historical observations with solid lines and model-generated predictions with dotted lines.

Summary Statistics provides filterable minimum and maximum values for selected data series. Expandable explanations introduce the indices and forecasting methodology, while light and dark themes provide alternative views of the dashboard.

Note 03

The offline training pipeline

The Jupyter Notebook pipeline ingests All_India_Index_july2019_20Aug2020.csv, handles missing values, maps month names to numbers, and one-hot encodes the rural and urban sectors. Inputs are Year, Month_Num, Rural, and Urban; the prediction target is the General index.

The documentation describes an 80:20 training/test split. StandardScaler is fitted on training features and then applied to both partitions. A TensorFlow–Keras Sequential network uses Dense layers with 64 and 32 ReLU units followed by a single regression output.

Training uses Adam, mean squared error loss, and 300 epochs. ModelCheckpoint selects the model based on validation loss; cost_of_living_model.keras and the fitted scaler connect the training pipeline to the application.

Note 04

Serving predictions efficiently

The Streamlit application caches the model, scaler, and dataset using st.cache_resource and st.cache_data. Selected dates are converted into sector-specific inputs, scaled, and passed to the trained model.

For future trend displays, the application batches intermediate dates into a vectorized prediction call. Forecasts are combined with historical records and labelled as real or predicted for the charts and summary cards.

Note 05

Reported evaluation

The supplied documentation reports a test-set mean squared error of 2.90 and mean absolute error of 1.26 CPI index points. These are results of the documented evaluation, rather than a new independent reproduction.

The reported 80:20 split is not described as a chronological forecasting backtest. These metrics should therefore be read as test-set regression performance, rather than a guarantee of accuracy for future economic conditions.

1.26
Reported test MAE · CPI index pointsMSE: 2.90. Results reported in the supplied project documentation.
Note 06

Tools and implementation

The documented environment uses Python 3.11+, TensorFlow 2.20.0, Keras 3.11.3, Pandas 2.3.3, NumPy 2.3.4, Scikit-learn 1.7.2, Plotly 6.3.1, and Streamlit 1.50.0. Jupyter supports exploration and model training.

The dashboard combines custom CSS, a glass-card aesthetic, and interactive Plotly visualisations. The original technical documentation and source repository are linked above.

Note 07

Future development

Planned enhancements include automated CPI data ingestion, additional macroeconomic features, experiments with LSTM and GRU models, database-backed prediction logs, and user accounts with saved forecasts and notifications. These are future directions rather than current features.

Next projectAdaptive LiDAR Mapping