Skip to content

Glutara Machine Learning. Built with TensorFlow, Firebase, Docker.

Notifications You must be signed in to change notification settings

Glutara/glutara-machine-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Glutara

A Key to Your Diabetes Journey


Glutara Machine Learning

Your personal whisperer: Glutara's cutting-edge machine learning deciphers your unique biological dance, translating data into actionable insights. It's your future health confidante, whispering personalized recommendations and guiding you towards empowered decisions.

👨🏻‍💻  Technology Stack

TensorFlow | Firebase | Docker

Getting Started

Make sure you already do these things before running the code

  1. Install Python languange on your computer
  2. Install the package you need to run the code (pandas, scikit-learn, tensorflow, numpy) using this following command
    $ pip install pandas scikit-learn tensorflow numpy
  3. Install Docker on your computer
  4. Download the Tensorflow Serving image to Docker using this following command
    $ docker pull tensorflow/serving

⚙️  How to Run

On this example of how to run, we will use the port 8605 to host Tensorflow Serving

  1. Clone this repository from terminal using this following command
    $ git clone https://github.com/Glutara/glutara-machine-learning.git
  2. There should be some model files inside tensorflow_model/1 directory. But if not, then navigate to src directory and execute this command to save the model. Skip this step if the model is already present
    $ python main.py
  3. After saving the model, open your terminal and create a Docker container using this following command
    $ docker run -it -v absolute/path/to/repository/directory:/glutara-machine-learning -p 8605:8605 --entrypoint /bin/bash tensorflow/serving
    Executing this command should also open the container command line
  4. Run Tensorflow Serving by using this following command inside the container command line
    $ tensorflow_model_server --rest_api_port=8605 --model_name=glutara_model --model_base_path=/glutara-machine-learning/tensorflow_model
  5. The Tensorflow Serving should be running and ready to respond to inference request. You can also check the serving by opening http://localhost:8605/v1/models/glutara_model

🔎  Machine Learning Algorithm

Our machine learning model currently use linear regression algorithm to predict unseen data. This algorithm try to capture the linear relationship between input (features) and prediction/output (target) by finding the best-fitting line of the form y = mx + b. Through linear regression algorithm, our model will learn and find the best parameter 'm' and 'b' to minimize the difference between predicted value and actual value of the data.

To train our model, we split our dataset into training set and validation set. This separation allows us to evaluate the model's performance on unseen data. We then train our model using Stochastic Gradient Descent technique with 1000 epochs/iteration and a batch size of 10 to ensure convergence of model parameters. The performance of our trained model is then evaluated using mean squared error (MSE) metrics. The calculated MSE for our model is 384.7645802644741, indicating the overall accuracy of our predictions.

👥  Contributors

Bandung Institute of Technology

Bandung Institute of Technology

Bandung Institute of Technology

Bandung Institute of Technology