The world’s leading publication for data science, AI, and ML professionals.

Build No-code Automated Machine Learning Model with OptimalFlow Web App

OptimalFlow added a Flask-based 'no-code' Web App as a GUI. Users could build Automated Machine Learning model all by clicks, without…

Photo by Kevin Ku on Unsplash
Photo by Kevin Ku on Unsplash

In the latest version(0.1.10) of OptimalFlow, it added a "no-code" Web App as an application demo built on OptimalFlow. The web app allows simple click and selection for all of the parameters inside of OptimalFLow, which means users could build end-to-end Automated Machine Learning workflow without coding at all! (Documentation).

[OptimalFlow](https://github.com/tonyleidong/OptimalFlow/) was designed highly modularized at the beginning, which made it easy to continue developing. And users could build applications based on it. The web app of OptimalFlow is a user-friendly tool for people who don’t have coding experience to build an Omni-ensemble Automated Machine Learning workflow simply and quickly.

Why we use OptimalFlow? You could read another story of its introduction: "An Omni-ensemble Automated Machine Learning – OptimalFlow".

The Web App currently includes 3 function components: Pipeline Cluster Traversal Experiment(PCTE) Builder, LogsViewer, and Visualization. Users can set up the parameters for each OptimalFlow’s key module, and run the workflow all by clicking on the web page. Also, when the automated machine learning process(PCTE) has done, users could check logs information and review the visualization outputs immediately.

Comparing other popular ‘no-code’ machine learning platforms, the Web App is born from OptimalFlow‘s unique Omni-ensemble Automated Machine Learning framework and built on Pipeline Cluster Traversal Experiments(PCTE) theory. It’s also light, scalable, and open-source to users. It was designed for data scientists who need more focus on local implementation and can be easily transplanted among machines. When the Data Science team wants to deploy it on a server, Flask based Web App can be quickly implemented with high flexibility.


How to deploy Web App:

Step 1: Install OptimalFlow:

If you didn’t install OptimalFlow‘s **** latest version, you should do that from PYPI, simply using PIP. To install OptimalFlow’s latest version, run this command in your terminal or prompt:

pip install --upgrade optimalflow

Step 2: Download Web App’s source code:

There’re 2 ways to download its source code:

  • Method 1 Get it from OptimalFlow GitHub. Download all codes and sub-folders within the folder ‘webapp‘.

Method 2 – Get from OptimalFlow’s package. You could find it in your Python core folder. Here’s the example where you can find the ‘Webapp‘ folder.

Step 3: Start a server port:

Move the downloaded ‘Webapp’ folder to the place you want to store it. Using your Terminal or Prompt enter its directory and run the app.py (ignore ‘py’ here when you are not playing it in VS Code)

And you will see the output similar to the picture below:

Done! You can now open your browser (recommend Chrome), and type 127.0.0.1:500 to open the web app on your laptop.

Build Pipeline Cluster Traversal Experiment(PCTE) Workflow:

When you’ve done the deployment steps, and start running the server, you will see the web app in your browser like the picture below:

To build a PCTE Automated Machine Learning Workflow, you need to enter the parameters for each OptimalFlow‘s **** module: _autoP_P, autoFS, and _autoC_V.

But before that, you need to move the dataset you want to build model into the ./input folder. You will see a sample dataset called "breast-cancer.csv" there.

After doing that, we could select the dataset by clicking the button under "Load Dataset":

Then, you need to finish the settings for autoPP, autoFS, and autoCV step by step.

Please NOTE: be careful to the setting "sparsity" and "cols" values in autoPP parameters panel, if the combination of the feature preprocessing can’t meet the restriction values you’ve set, OptimalFlow will not able to continue running the following modules. More details could be found in autoPP’s Documentation.

Next, you need to finish set parameters in autoFS module, i.e. set how many top features you want to select, and what algorithm you want PCTE to go through. More details about autoFS module here.

For the autoCV module’s settings, you could click the autoCVSet Parameters‘ button, and enter the tuning strategy and algorithms comparison scope you want OptimalFlow to automatedly test. More details about autoCV module here.

Finally, when you finished all setting steps(the progress bar should be fulfilled 100%), you can click the ‘Build PCTE Workflow‘ button, to run the Omni-ensemble Automated Machine Learning operation. This function is based on autoPipe module, more details about autoPipe is here.

Here are the sample outputs when the process’s done. You will find the Top 5 Optimal models with evaluation metrics there. More details and use cases about OptimalFlow modules and notebook samples could be found in Documentation.

LogsViewer:

You could view the logs information related to each module in ‘LogsViewer‘ page. Please note, you could only use it after the previous automated machine learning process’s done.

Visualization:

You could also review the visualization outputs from the ‘Visualization’ page. For the classification problems, it will present ‘Pipeline Cluster Traversal Experiments Model Retrieval Diagram’ and ‘Pipeline Cluster Model Evaluation Dynamic Table’. And for the regression problem, it only will present ‘Pipeline Cluster Model Evaluation Dynamic Table‘. All visualization outputs are based on Plotly, so you could play with them by dragging or scrolling. You will find more details on the example page.

Updates:

SearchingSpace

In OptimalFlow’s next version 0.1.11, you could edit the estimators’ Searching Space via the Web App.


In Summary:

OptimalFlow is an easy-use API tool to achieve Omni-ensemble automated machine learning with simple code, and it’s also a best practice library to prove Pipeline Cluster Traversal Experiments (PCTE) theory.

The Web App in its latest version is a handful application built on OptimalFlow Library, and make the Automated Machine Learning workflow building process easy and no-code at all.

Its 6 modules could not only be connected to implement PCTE process, but also could be used individually to optimize traditional machine learning workflow’s components. You can find their individual use cases in Documentation.


Related Readings about OptimalFlow:

Ensemble Feature Selection in Machine Learning using OptimalFlow – Easy Way with Simple Code to Select top Features

Ensemble Model Selection & Evaluation in Machine Learning using OptimalFlow – Easy Way with Simple Code to Select the Optimal Model

End-to-end OptimalFlow Automated Machine Learning Tutorial with Real Projects-Formula E Laps Prediction Part 1

End-to-end OptimalFlow Automated Machine Learning Tutorial with Real Projects-Formula E Laps Prediction Part 2


About me:

I am a healthcare & pharmaceutical Data Scientist and big data Analytics & AI enthusiast. I developed OptimalFlow library to help data scientists building optimal models in an easy way, and automate Machine Learning workflow with simple codes.

As a big data insights seeker, process optimizer, and AI professional with years of analytics experience, I use machine learning and problem-solving skills in data science to turn data into actionable insights while providing strategic and quantitative products as solutions for optimal outcomes.

You can connect with me on LinkedIn or GitHub.


Related Articles