Skip to content

OptimalFlow is an omni-ensemble and scalable automated machine learning Python toolkit, which uses Pipeline Cluster Traversal Experiments(PCTE) and Selection-based Feature Preprocessor with Ensemble Encoding(SPEE), to help data scientists build optimal models, and automate supervised learning workflow with simpler coding.

License

Notifications You must be signed in to change notification settings

tonyleidong/OptimalFlow

Repository files navigation

OptimalFlow

PyPI Latest Release Downloads Github Issues License Last Commit Python Version

Author: Tony Dong

Publication

Lei(Tony) Dong, Syed Khader. GENPACT GVector Augmented Intelligence Conference, November 2020. OptimalFlow: Omni-ensemble and Scalable Automated Machine Learning.pdf

Installation

pip install OptimalFlow

Introduction

OptimalFlow is an omni-ensemble and scalable automated machine learning Python toolkit, which uses Pipeline Cluster Traversal Experiments(PCTE) and Selection-based Feature Preprocessor with Ensemble Encoding(SPEE), to help data scientists build optimal models, and automate supervised learning workflow with simpler coding.

OptimalFlow wraps the Scikit-learn supervised learning framework to automatically create an ensemble of machine learning pipelines(Omni-ensemble Pipeline Cluster) based on algorithms permutation in each framework component. It includes feature engineering methods in its preprocessing module such as missing value imputation, categorical feature encoding, numeric feature standardization, and outlier winsorization. The models inherit algorithms from Scikit-learn and XGBoost estimators for classification and regression problems. And the extendable coding structure supports adding models from external estimator libraries, which distincts OptimalFlow ’s scalability out of most of AutoML toolkits.

OptimalFlow uses Pipeline Cluster Traversal Experiments as the optimizer to build an omni-ensemble workflow for an optimal baseline model searching, including feature preprocessing/selection optimization, hyperparameters tuning, model selection and assessment.

After version 0.1.10, 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!(Read more details https://optimal-flow.readthedocs.io/en/latest/webapp.html)

WebApp Demo

Comparing other popular "AutoML or Automated Machine Learning" APIs, OptimalFlow is designed as an omni-ensembled ML workflow optimizer with higher-level API targeting to avoid manual repetitive train-along-evaluate experiments in general pipeline building.

To achieve that, OptimalFlow applies Pipeline Cluster Traversal Experiments algorithm to assemble all cross-matching pipelines covering major tasks of Machine Learning workflow, and apply traversal-experiment to search the optimal baseline model.

Besides, by modularizing all key pipeline components in reuseable packages, it allows all components to be custom tunable along with high scalability.

The core concept in OptimalFlow is Pipeline Cluster Traversal Experiments, which is a theory, first raised by Tony Dong during Genpact 2020 GVector Conference, to optimize and automate Machine Learning Workflow using ensemble pipelines algorithm.

Comparing other automated or classic machine learning workflow's repetitive experiments using single pipeline, Pipeline Cluster Traversal Experiments is more powerful, with larger coverage scope, to find the best model without manual intervention, and also more flexible with elasticity to cope with unseen data due to its ensemble designs in each component.

In summary, OptimalFlow provides the following benefits to data scientists:

  • Easy coding - High-level APIs to implement PCTE, and each machine learning component is highly automated and modularized;

  • Easy transformation - Focus on process automation for local implementation, which is easy to transfer current operation and meet compliance restrictions, i.e. pharmaceutical compliance policy;

  • Easy maintenance - Wrap machine learning components to well-modularized code packages without miscellaneous parameters inside;

  • Light & swift - Easy to transplant among projects. Quick and convenient, to deploy compared with other cloud-based solutions(i.e. Microsoft Azure AutoML);

  • Omni ensemble - Easy for data scientists to implement iterated experiments across all ensemble components in the workflow;

  • High Scalability - Each module allows addition of add new algorithms easily owing to its ensemble and reusable coding design. PCTE and SPEE make it easier to adapt unseen datasets with the right pipeline;

  • Customization - Support custom settings to add/remove algorithms or modify hyperparameters for elastic requirements.

Core Modules:

  • autoPP for feature preprocessing
  • autoFS for classification/regression features selection
  • autoCV for classification/regression model selection and evaluation
  • autoPipe for Pipeline Cluster Traversal Experiments
  • autoViz for pipeline cluster visualization. Current available: Model retrieval diagram
  • autoFlow for logging & tracking.

Notebook Demo:

Binder

An End-to-End OptimalFlow Automated Machine Learning Tutorial with Real Projects

Other Stories:

Support OptimalFlow

If you like OptimalFlow, please consider starring or forking it on GitHub and spreading the word!

Github Stars Github Forks

Please, Avoid Selling this Work as Yours

Voice from the Author: I am glad if you find OptimalFlow useful and helpful. Feel free to add it to your project and let more people know how good it is. But please avoid simply changing the name and selling it as your work. That's not why I'm sharing the source code, at all. All copyrights reserved by Tony Dong following MIT license.

License:

MIT

Updates History:


Updates on 9/29/2020

  • Added SearchinSpace settings page in Web App. Users could custom set estimators/regressors' parameters for optimal tuning outputs.
  • Modified some layouts of existing pages in Web App.

Updates on 9/16/2020

  • Created a Web App based on flask framework as OptimalFlow's GUI, to build PCTE Automated Machine Learning by simply clicks without any coding at all!
  • Web App included PCTE workflow bulder, LogsViewer, Visualization, Documentation sections.
  • Fix the filename issues in autoViz module, and remove auto_open function when generating new html format plots.

Updates on 8/31/2020

  • Modify autoPP's default_parameters: Remove "None" in "scaler", modify "sparsity" : [0.50], modify "cols" : [100]
  • Modify autoViz clf_table_report()'s coloring settings
  • Fix bugs in autoViz reg_table_report()'s gradient coloring function

Updates on 8/28/2020

  • Remove evaluate_model() function's round() bugs in coping with classification problem
  • Move out SVM based algorithm from fastClassifier & fastRegressor's default estimators settings
  • Move out SVM based algorithm from autoFS class's default selectors settings

Updates on 8/26/2020

  • Fix evaluate_model() function's bugs in coping with regression problem
  • Add reg_table_report() function to create dynamic table report for regression problem in autoViz

Updates on 8/24/2020

  • Fix evaluate_model() function's precision_score issue when running modelmulti-class classification problems
  • Add custom_selectors args for customized algorithm settings with autoFS's 2 classes(dynaFS_reg, dynaFS_clf)

Updates on 8/20/2020

  • Add Dynamic Table for Pipeline Cluster Model Evaluation Report in autoViz module
  • Add custom_estimators args for customized algorithm settings with autoCV's 4 classes(dynaClassifier,dynaRegressor,fastClassifier, and fastRegressor)

Updates on 8/14/2020

  • Add fastClassifier, and fastRegressor class which are both random parameter search based
  • Modify the display settings when using dynaClassifier in non in_pipeline mode

Updates on 8/10/2020

  • Stable 0.1.0 version release on Pypi

Updates on 8/7/2020

  • Add estimators: HuberRegressor, RidgeCV, LassoCV, SGDRegressor, and HistGradientBoostingRegressor
  • Modify parameters.json, and reset_parameters.json for the added estimators
  • Add autoViz for classification problem model retrieval diagram

About

OptimalFlow is an omni-ensemble and scalable automated machine learning Python toolkit, which uses Pipeline Cluster Traversal Experiments(PCTE) and Selection-based Feature Preprocessor with Ensemble Encoding(SPEE), to help data scientists build optimal models, and automate supervised learning workflow with simpler coding.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published