How mp-balaji/deepar-based-resource-recommendation-framework-for-cloud-computing-systems works
Project Type and Purpose
• Type: It is essentially a data modeling and forecasting project with a focus on time series analysis for CPU usage.
File Structure
• File tree highlights:
• Dataset Script: dataset.sh – fetches CPU workload data.
• Feature Engineering: feature_engineering.py – cleans and augments the dataset.
• Forecasting Models: baseline_arima.py, baseline_lstm.py, and deepar_modelling.py – each represents a different modeling technique.
• Data Artifact: df_scaled.csv – serves as a key input/output artifact between processes.
• Output: The output folder contains various plots and visualizations generated by these scripts.
• These files clearly indicate a pipeline separation where the dataset is first fetched, then processed (feature engineering), and subsequently used in different prediction models.
Main Components
• Data Ingestion & Extraction:
• Component: dataset.sh
• Role: Downloading and extracting the dataset.
• Data Preprocessing & Feature Engineering:
• Component: feature_engineering.py
• Role: Combining CSV files, adding relevant time components/features, and performing stationarity tests.
• Modeling and Prediction:
• Component: baseline_arima.py for ARIMA modeling.
• Component: baseline_lstm.py for LSTM model forecasting.
• Component: deepar_modelling.py for deploying DeepAR using AWS SageMaker.
• Data Artifacts:
• File: df_scaled.csv acts as the connection between the feature engineering stage and the modeling stages.
• Visualization and Output:
• Directory: output stores the generated plots (CPU usage visualizations, anomaly detection plots, etc.).
Relationships and Interactions
• Flow:
• The process begins with data ingestion (dataset.sh) and then moves to feature engineering (feature_engineering.py) which outputs df_scaled.csv.
• df_scaled.csv is then consumed by each model script (arima, lstm, and deepar) to generate predictions.
• Each of these scripts produces visual outputs (plots) saved to the output folder.
Architectural Patterns and Design Principles
• The project follows a modular pipeline design where each stage of data processing is encapsulated in its own script.
• Data flow separation; feature engineering is decoupled from modeling, and each modeling approach is implemented in a separate module.
• Notice the integration between local execution (support for local paths) versus deployment environments (Google Colab, AWS SageMaker) which shows an abstraction for handling different runtime environments.
Specific Technologies/Frameworks
• Data Libraries: numpy, pandas, matplotlib, seaborn, statsmodels, and scikit-learn.
• Deep Learning Framework: keras for LSTM.
• AWS SageMaker: For running the DeepAR model.
• Deployment/Execution: Instructions for Google Colab and local environments indicate additional dependency layers.