Skip to content

Oyebamiji-Micheal/Prediction-of-Mohs-Hardness

Repository files navigation

Prediction of Mohs Hardness

Language Framework build reposize Topic Cloud Provider

An end to end approach to machine learning

"Dinosaurs that failed to adapt went extinct. The same thing will happen to data scientists who think that training ML models inside Jupyter notebooks is enough." - Pau Labarta Bajo.


You can view the live demo of the web app here

Table of Contents

Overview

Hey guys! It's my first MLOps project - a comprehensive showcase of end-to-end machine learning that seamlessly integrates various real-world components including robust data ingestion, validation, and an efficient data cleaning and transformation pipeline. While completing this project, I aimed not just to showcase machine learning prowess but also to demonstrate effective OOP practices. In addition, I have followed an automated and scalable approach and also ensured modularity.

Objective

Almost all of my past ML projects were done locally inside a Jupyter notebook with only a handful incorporating tools such as APIs and Streamlit deployment. Moving on, my primary objective is to provide a holistic demonstration of machine learning operations (MLOps) and object-oriented programming (OOP) practices while leveraging tools like MLflow for experiment tracking, and seamlessly integrating continuous integration and continuous deployment (CI/CD) pipelines and so on. I will progressively integrate tools like GitHub Actions as I advance, fostering a collaborative and efficient development environment. Thus far have I come!

Mohs Hardness and What it's all about

The Mohs scale of mineral hardness is a qualitative ordinal scale, from 1 to 10, characterizing the scratch resistance of minerals through the ability of harder material to scratch softer material. - Wikipedia.


The motivation behind this project is to predict the Mohs hardness of minerals of different chemical spaces, crystal structures, and crystal classes. If you would like to have an in-depth understanding of the project source idea, kindly refer here.

Dataset

The datasets used in this repository were obtained from an active (at the time of completing this project) competition on Kaggle. My notebook for the competition which includes training and evaluation is available publicly on the platform.

Additional Info

This project was implemented using the simplest techniques. Hence, you should not expect to see things like cross-validation, extensive feature engineering, hyperparameter tuning, feature selection, and so on. It is worth mentioning that an additional endpoint, '/train', was included. The purpose of this endpoint is basically to initiate the training pipeline and retrain the model from scratch.

Running Locally

STEP 00 - Clone the repository

git clone https://github.com/Oyebamiji-Micheal/Prediction-of-Mohs-Hardness

STEP 01 - Create a virtual environment

Windows (cmd)

cd Prediction-of-Mohs-Hardness
pip install virtualenv
python -m virtualenv venv

or

python3 -m venv venv

macOS/Linux

cd Prediction-of-Mohs-Hardness
pip install virtualenv
python -m virtualenv venv

STEP 02 - Activate environment

Windows (cmd)

venv\scripts\activate

macOS/Linux

. venv/bin/activate

or

source venv/bin/activate

STEP 03 - Install the Requirements

Windows/macOS/Linux

pip install -r requirements.txt

STEP 04 - Run app.py

python app.py

Now,

Open the url: http://127.0.0.1:8080/ 

About

A comprehensive showcase of end-to-end machine learning using AWS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published