Skip to content

bayu-siddhi/tfx-load-type-prediction

Repository files navigation

MLOps Project: Predicting Steel Industry Energy Consumption Load Type Using TensorFlow-Extended Pipeline


This project focuses on developing a machine learning model using a TensorFlow-Extended pipeline to predict energy consumption load types (Light, Medium, Maximum) in the steel industry, aiming to improve energy efficiency and reduce costs.

Section Description
Dataset The dataset used for this project is the Steel Industry Energy Consumption from the UCI Machine Learning Repository.
Problem Energy efficiency is a crucial factor for industry sustainability, including in the steel industry. The "Steel Industry Energy Consumption" dataset from the UCI Machine Learning Repository provides data collected from a small-scale steel industry in South Korea. This data includes information about energy consumption, reactive power, CO2 emissions, and other variables. This project aims to develop a machine learning model that can predict the energy load type (Load Type) in the steel industry (consisting of Light Load, Medium Load, and Maximum Load), based on energy consumption data and other related factors. By predicting the load type, the industry can optimize energy usage, reduce operational costs, and minimize environmental impact.
Machine Learning Solution The machine learning solution implemented is a multi-class classification model. This model will be trained to classify the load type (Load Type) into three categories: Light Load, Medium Load, and Maximum Load, based on the features present in the dataset. The model will be built using a neural network architecture.
Preprocessing Method The dataset consists of 35040 data points. The dataset will be split into training and evaluation sets with a 9:1 ratio. The dataset contains numerical and categorical features, and there are no missing values. Categorical features will be transformed into numerical using one-hot encoding. Numerical features will be scaled to align their scale and facilitate machine learning model training.
Model Architecture The model architecture to be used is a simple neural network built using TensorFlow, with an end-to-end pipeline implemented using TensorFlow Extended (TFX). The model will be built with several dense (fully connected) layers using ReLU activation functions, ending with a dense layer using the softmax activation function for multi-class classification (3 load type classes).
Evaluation Metrics To evaluate the model's performance, several classification metrics will be used, including accuracy, precision, recall, and F1-score. The F1-score with a threshold of 0.8 will be the primary metric to determine if the model is satisfactory and whether any changes to the model are significant enough to be considered a real improvement.
Model Performance The developed neural network model shows good performance in predicting the 3 load type classes, with accuracy and F1-score values reaching 0.89 on the evaluation dataset within 100 training epochs. However, the author's observations regarding the loss and performance during training indicate that the model has not fully converged, suggesting there is still room for performance improvement through better data engineering, more extensive training, or the use of a more complex model.
Deployment Option The deployment of this machine learning pipeline uses the cloud platform Railway with a Dockerfile as input.
Web App The deployed ML model can be accessed at: load-type-prediction-model
Monitoring Monitoring for this system is performed using Prometheus. A Grafana dashboard is used for visualizing the monitoring data. Some metrics monitored include request count, input tensor bytes sum, output tensor bytes sum, and request latency count. Generally, the dashboard indicates that the model is active and functioning well, with stable activity and relatively low latency.

Note

This project was developed using Python 3.9.13. A complete list of dependencies can be found in the requirements.txt file.

About

Final Project of "Machine Learning Operations (MLOps)" course from Dicoding Indonesia. Creating MLOps pipeline using TensorFlow-Extended (TFX)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published