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.
Make sure you already do these things before running the code
- Install Python languange on your computer
- 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
- Install Docker on your computer
- Download the Tensorflow Serving image to Docker using this following command
$ docker pull tensorflow/serving
On this example of how to run, we will use the port 8605 to host Tensorflow Serving
- Clone this repository from terminal using this following command
$ git clone https://github.com/Glutara/glutara-machine-learning.git
- 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
- After saving the model, open your terminal and create a Docker container using this following command
Executing this command should also open the container command line
$ docker run -it -v absolute/path/to/repository/directory:/glutara-machine-learning -p 8605:8605 --entrypoint /bin/bash tensorflow/serving
- 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
- 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
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.
Bandung Institute of Technology |
Bandung Institute of Technology |
Bandung Institute of Technology |
Bandung Institute of Technology |