Building Machine Learning Model and Platform - XenonStack

Overview of Machine Learning and Kubernetes

Building Machine Learning Model could be a challenging task if not work properly. Let’s review the use case that shows some methods and patterns.

  • Analyze Big Data and make predictions out of the data requires training with Machine Learning Algorithms. In Data Science, there are lots of Machine Learning Models and Algorithms available like Regression, Classification, and Segmentation.
  • Web Platforms make it easy for users to use the Machine Learning Models with an Interactive Web Interface. Python web APIs provide an excellent way for this and make the task more manageable. It gives web UI solutions for users to train models and make predictions.

Flask – Python Microframework

Flask framework is excellent and easy to use with python APIs. Flask is a microframework for Python based on Werkzeug, Jinja2.

Python Applications on Kubernetes

Kubernetes provides libraries for Python to perform various actions of Kubernetes. Python Client Library for Kubernetes creates new pods and delete pods accordingly.

Challenge for Building Machine Learning Models

The Data Scientists build models, but the major problem is how to use these models. They need a Platform to –

  • Train any model based on the input data and then run prediction algorithms to do forecasting.
  • Interactive Web UI to run models by just clicking a button.
  • Capable of handling several requests at the same time without any conflicts in the results.

Solution Offered for Building Prediction Platform

  • Build Prediction Platform to run any model. Build an API which gives utility to train models and use models for prediction.
  • API allows the user to upload data. The information of data saves in the database.
  • After data upload, the user hits the train button, the API launches a Kubernetes pod to process the training of the model.
  • On the prediction web page, API provides an option to run available models. Users can upload files as input data and run any of the available models on uploaded data.
  • As the user clicks on the prediction button, Kubernetes pods launch.
  • The pod gets information about the input data from the database and downloads the appropriate model (which the user selected) from the Cloud.
  • After that, process the input data with the model and generate the prediction result. The result saves in the database.
Read more