├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── README.md ├── build └── lib │ └── optimalflow │ ├── __init__.py │ ├── autoCV.py │ ├── autoFS.py │ ├── autoPP.py │ ├── autoPipe.py │ ├── autoViz.py │ ├── estimatorCV.py │ ├── funcPP.py │ ├── parameters.json │ ├── reset_parameters.json │ ├── selectorFS.py │ ├── utilis_func.py │ └── webapp │ ├── app.py │ ├── input │ └── breast_cancer.csv │ ├── reset_settings.json │ ├── settings.json │ ├── settings_script.py │ ├── static │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── heroic-features.css │ ├── img │ │ ├── OptimalFlow_Logo.png │ │ ├── OptimalFlow_Workflow.PNG │ │ ├── Profile.jpg │ │ └── no-cls-output.html │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── dependent-selects.js │ ├── templates │ ├── about.html │ ├── base.html │ ├── diagram.html │ ├── docs.html │ ├── index.html │ ├── logfile.html │ ├── logs.html │ ├── nologfile.html │ ├── parameters.html │ ├── report.html │ └── viz.html │ ├── webapp.json │ └── webapp_script.py ├── dist ├── optimalflow-0.1.11-py3-none-any.whl └── optimalflow-0.1.11.tar.gz ├── docs ├── Learning_Curve_Compare.png ├── Makefile ├── OptimalFlow-WebApp-slow.gif ├── OptimalFlow_Components.PNG ├── OptimalFlow_Logo.png ├── OptimalFlow_Omni-ensemble_and_Scalable_Automated_Machine_Learning.pdf ├── OptimalFlow_Workflow.PNG ├── OptimalFlow_logo_transparent.png ├── PCA-based_feature_preprocessor.PNG ├── Parallel_Coordinates_Plot.png ├── Parallel_Coordinates_Plot_before_PCTE.png ├── Parallel_coordinates_compare.PNG ├── PipelineClusterTraversalExperiments.PNG ├── SinglePipelineRepetitiveExperiments.PNG ├── Webapp-Documentation.PNG ├── Webapp-LogsViewer.PNG ├── Webapp-PCTE.PNG ├── authors.rst ├── autoCV.rst ├── autoCV_log_2020.08.07.17.28.34.log ├── autoCV_log_sample (1).log ├── autoCV_log_sample.log ├── autoFS.rst ├── autoFS_log_2020.07.16.12.25.48.log ├── autoFlow.rst ├── autoPP.rst ├── autoPP_log_2020.08.07.17.28.34.log ├── autoPipe.rst ├── autoPipe_log_2020.08.07.17.28.34.log ├── autoViz.rst ├── autoViz_Demo.PNG ├── autoViz_Demo_Dynamic_Table.PNG ├── autoViz_Demo_Model_Retrieval_Diagram.png ├── autoViz_Model_Retrieval_Diagram_Demo.html ├── comparison_table.PNG ├── conf.py ├── demos.rst ├── history.rst ├── index.rst ├── installation.rst ├── issues.rst ├── make.bat ├── model_selection_algorithms.PNG ├── parallel_coordinates_comparison.PNG ├── parameters.json ├── preprocessing_algorithms.PNG ├── requirements.txt ├── reset_parameters.json ├── selection-based_feature_preprocessor_with_ensemble_encoding.PNG ├── webapp-SearchingSpace.PNG ├── webapp-SearchingSpaceSet.png ├── webapp-Visualization.PNG ├── webapp-deployment-0.PNG ├── webapp-deployment-1.PNG ├── webapp-deployment-2.PNG ├── webapp-deployment-3.PNG ├── webapp-pcte-end-run.PNG ├── webapp-pcte-initial.PNG ├── webapp-pcte-load-data.PNG ├── webapp-pcte-set-autoCV.PNG ├── webapp-pcte-set-autoFS.PNG ├── webapp-pcte-set-autoPP.PNG ├── webapp-pcte-start-run.PNG └── webapp.rst ├── logs └── autoCV_log_2020.08.14.16.17.42.log ├── optimalflow.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── requires.txt └── top_level.txt ├── optimalflow ├── __init__.py ├── autoCV.py ├── autoFS.py ├── autoPP.py ├── autoPipe.py ├── autoViz.py ├── estimatorCV.py ├── funcPP.py ├── parameters.json ├── reset_parameters.json ├── selectorFS.py ├── utilis_func.py └── webapp │ ├── app.py │ ├── input │ └── breast_cancer.csv │ ├── reset_settings.json │ ├── settings.json │ ├── settings_script.py │ ├── static │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ └── heroic-features.css │ ├── img │ │ ├── OptimalFlow_Logo.png │ │ ├── OptimalFlow_Workflow.PNG │ │ ├── Profile.jpg │ │ └── no-cls-output.html │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ └── dependent-selects.js │ ├── templates │ ├── about.html │ ├── base.html │ ├── diagram.html │ ├── docs.html │ ├── index.html │ ├── logfile.html │ ├── logs.html │ ├── nologfile.html │ ├── parameters.html │ ├── report.html │ └── viz.html │ ├── webapp.json │ └── webapp_script.py ├── setup.py └── tests ├── Demo_autoCV.py ├── Demo_autoFS.py ├── Pipeline Cluster Model Evaluation Report.html ├── Pipeline Cluster Retrieval Diagram.html ├── Ver_0.1.1_autoCV.py ├── Ver_0.1.1_estimatorCV.py ├── __pycache__ └── autoViz.cpython-38.pyc ├── autoCV_clf_demo.ipynb ├── autoCV_reg_demo.ipynb ├── autoFS_demo.ipynb ├── autoFlow.py ├── autoViz.py ├── data ├── boston.csv ├── boston_target.csv ├── classification │ ├── test_features.csv │ ├── test_labels.csv │ ├── train_features.csv │ ├── train_labels.csv │ ├── val_features.csv │ └── val_labels.csv ├── preprocessing │ ├── breast-cancer-category.csv │ └── breast_cancer.csv ├── regression │ ├── test_features.csv │ ├── test_labels.csv │ ├── train_features.csv │ ├── train_features_reg.csv │ ├── train_labels.csv │ ├── train_labels_reg.csv │ ├── val_features.csv │ └── val_labels.csv ├── test_features.csv ├── test_labels.csv ├── train_features.csv ├── train_labels.csv ├── val_features.csv └── val_labels.csv ├── dict_data.pkl ├── dict_models_evaluate.pkl ├── dict_preprocess.pkl ├── draft.ipynb ├── dyna_report.csv ├── dyna_report.pkl ├── estimatorCV.py ├── logs ├── autoCV_log_2020.08.24.15.36.09.log ├── autoFS_log_2020.08.24.15.36.07.log ├── autoPP_log_2020.08.24.15.36.07.log └── autoPipe_log_2020.08.24.15.36.09.log ├── notebook_demo.ipynb ├── paper ├── dict_data.pkl ├── dict_models_evaluate.pkl ├── dict_preprocess.pkl ├── dyna_report.pkl ├── figures.ipynb └── logs │ ├── autoCV_log_2020.10.19.10.27.18.log │ ├── autoFS_log_2020.10.19.10.27.17.log │ ├── autoPP_log_2020.10.19.10.27.17.log │ └── autoPipe_log_2020.10.19.10.27.18.log ├── path_test.py ├── pkl ├── ada_clf_model.pkl ├── ada_reg_model.pkl ├── bagging_reg_model.pkl ├── cvlasso_reg_model.pkl ├── gb_clf_model.pkl ├── gb_reg_model.pkl ├── hgboost_clf_model.pkl ├── hgboost_reg_model.pkl ├── huber_reg_model.pkl ├── knn_reg_model.pkl ├── lgr_clf_model.pkl ├── lr_reg_model.pkl ├── lsvc_clf_model.pkl ├── mlp_clf_model.pkl ├── mlp_reg_model.pkl ├── nsvr_reg_model.pkl ├── rf_clf_model.pkl ├── rf_reg_model.pkl ├── rgcv_clf_model.pkl ├── rgcv_reg_model.pkl ├── sgd_clf_model.pkl ├── sgd_reg_model.pkl ├── svm_clf_model.pkl ├── svm_reg_model.pkl ├── tree_reg_model.pkl ├── xgb_clf_model.pkl └── xgb_reg_model.pkl ├── temp-plot.html ├── test_draft.ipynb └── webapp ├── app.py ├── draft.ipynb ├── input └── breast_cancer.csv ├── reset_settings.json ├── settings.json ├── settings_script.py ├── static ├── css │ ├── bootstrap-grid.css │ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.min.css.map │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.css.map │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ └── heroic-features.css ├── img │ ├── OptimalFlow_Logo.png │ ├── OptimalFlow_Workflow.PNG │ ├── Profile.jpg │ └── no-cls-output.html └── js │ ├── bootstrap.bundle.js │ ├── bootstrap.bundle.js.map │ ├── bootstrap.bundle.min.js │ ├── bootstrap.bundle.min.js.map │ ├── bootstrap.js │ ├── bootstrap.js.map │ ├── bootstrap.min.js │ ├── bootstrap.min.js.map │ └── dependent-selects.js ├── templates ├── about.html ├── base.html ├── diagram.html ├── docs.html ├── index.html ├── logfile.html ├── logs.html ├── nologfile.html ├── parameters.html ├── report.html └── viz.html ├── webapp.json └── webapp_script.py /HISTORY.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | History 3 | ======= 4 | 5 | 0.1.11 (2020-09-29) 6 | ------------------ 7 | * Added SearchinSpace settings page in Web App. Users could custom set estimators/regressors' parameters for optimal tuning outputs. 8 | * Modified some layouts of existing pages in Web App. 9 | 10 | 0.1.10 (2020-09-16) 11 | ------------------ 12 | * Created a Web App, based on flask framework, as OptimalFlow's GUI. Users could build Automated Machine Learning workflow all clicks, without any coding at all! 13 | * Web App included PCTE workflow bulder, LogsViewer, Visualization, Documentation sections. 14 | * Fix the filename issues in autoViz module, and remove auto_open function when generating new html format plots. 15 | 16 | 0.1.7 (2020-08-31) 17 | ------------------ 18 | * Modify autoPP's default_parameters: Remove "None" in "scaler", modify "sparsity" : [0.50], modify "cols" : [100] 19 | * Modify autoViz clf_table_report()'s coloring settings 20 | * Fix bugs in autoViz reg_table_report()'s gradient coloring function 21 | 22 | 0.1.6 (2020-08-28) 23 | ------------------ 24 | * Remove evaluate_model() function's round() bugs in coping with classification problem 25 | * Move out SVM based algorithm from fastClassifier & fastRegressor's default estimators settings 26 | * Move out SVM based algorithm from autoFS class's default selectors settings 27 | 28 | 0.1.5 (2020-08-26) 29 | ------------------ 30 | * Fix evaluate_model() function's bugs in coping with regression problem 31 | * Add reg_table_report() function to create dynamic table report for regression problem in autoViz 32 | 33 | 0.1.4 (2020-08-24) 34 | ------------------ 35 | * Fix evaluate_model() function's precision_score issue when running modelmulti-class classification problems 36 | * Add custom_selectors args for customized algorithm settings with autoFS's 2 classes(dynaFS_reg, dynaFS_clf) 37 | 38 | 0.1.3 (2020-08-20) 39 | ------------------ 40 | * Add Dynamic Table for Pipeline Cluster Model Evaluation Report in autoViz module 41 | * Add custom_estimators args for customized algorithm settings with autoCV's 4 classes(dynaClassifier,dynaRegressor,fastClassifier, and fastRegressor) 42 | 43 | 0.1.2 (2020-08-14) 44 | ------------------ 45 | 46 | * Add *fastClassifier*, and *fastRegressor* class which are both random parameter search based 47 | * Modify the display settings when using dynaClassifier in non in_pipeline mode 48 | 49 | 0.1.1 (2020-08-10) 50 | ------------------ 51 | 52 | * Add classifiers: LinearSVC, HistGradientBoostingClassifier, SGDClassifier, RidgeClassifierCV. 53 | * Modify Readme.md file. 54 | 55 | 0.1.0 (2020-08-10) 56 | ------------------ 57 | 58 | * First release on PyPI. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tony Dong - Github ID: tonyleidong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include HISTORY.rst 2 | include LICENSE 3 | include optimalflow/parameters.json 4 | include optimalflow/reset_parameters.json 5 | include optimalflow/webapp/* 6 | include optimalflow/webapp/input/* 7 | include optimalflow/webapp/static/css/* 8 | include optimalflow/webapp/static/js/* 9 | include optimalflow/webapp/static/img/* 10 | include optimalflow/webapp/templates/* 11 | recursive-exclude * __pycache__ 12 | -------------------------------------------------------------------------------- /build/lib/optimalflow/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | __author__ = 'Tony Dong' 3 | __email__ = 'tonyleidong@gmail.com' 4 | __version__ = '0.1.11' 5 | -------------------------------------------------------------------------------- /build/lib/optimalflow/parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]},"rgcv":{"fit_intercept":["False","True"]},"hgboost":{"max_depth":[3, 5, 7, 9],"learning_rate":[0.1, 0.2,0.3,0.4]} ,"lsvc": {"C": [0.1, 1, 10]},"sgd": {"penalty":["l1","l2","elasticnet"]},"svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}, "sgd": {"shuffle": ["True", "False"], "penalty": ["l2", "l1", "elasticnet"], "learning_rate": ["constant", "optimal", "invscaling"]}, "cvlasso": {"fit_intercept": ["True", "False"]}, "rgcv": {"fit_intercept": ["True", "False"]}, "huber": {"fit_intercept": ["True", "False"]}, "hgboost": {"max_depth": [3, 5, 7, 9], "learning_rate": [0.1, 0.2, 0.3, 0.4]}}} -------------------------------------------------------------------------------- /build/lib/optimalflow/reset_parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]},"rgcv":{"fit_intercept":["False","True"]},"hgboost":{"max_depth":[3, 5, 7, 9],"learning_rate":[0.1, 0.2,0.3,0.4]} ,"lsvc": {"C": [0.1, 1, 10]},"sgd": {"penalty":["l1","l2","elasticnet"]},"svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}, "sgd": {"shuffle": ["True", "False"], "penalty": ["l2", "l1", "elasticnet"], "learning_rate": ["constant", "optimal", "invscaling"]}, "cvlasso": {"fit_intercept": ["True", "False"]}, "rgcv": {"fit_intercept": ["True", "False"]}, "huber": {"fit_intercept": ["True", "False"]}, "hgboost": {"max_depth": [3, 5, 7, 9], "learning_rate": [0.1, 0.2, 0.3, 0.4]}}} -------------------------------------------------------------------------------- /build/lib/optimalflow/selectorFS.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import pandas as pd 4 | from sklearn.feature_selection import SelectKBest, chi2, RFE,RFECV, f_regression, f_classif 5 | from sklearn.svm import SVC, SVR 6 | from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor 7 | from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor 8 | from sklearn.linear_model import LogisticRegression 9 | 10 | import warnings 11 | warnings.filterwarnings('ignore', category=FutureWarning) 12 | warnings.filterwarnings('ignore', category=DeprecationWarning) 13 | 14 | class clf_fs: 15 | """This class stores classification selectors. 16 | 17 | Parameters 18 | ---------- 19 | fs_num : int, default = None 20 | Set the # of features want to select out. 21 | 22 | random_state : int, default = None 23 | Random state value. 24 | 25 | cv : int, default = None 26 | # of folds for cross-validation. 27 | Example 28 | ------- 29 | 30 | .. [Example] 31 | 32 | References 33 | ---------- 34 | None 35 | """ 36 | def __init__(self,fs_num = None ,random_state = None,cv = None): 37 | self.fs_num = fs_num 38 | self.random_state = random_state 39 | self.cv = cv 40 | def kbest_f(self): 41 | selector = SelectKBest(score_func = f_classif, k = self.fs_num) 42 | return (selector) 43 | def kbest_chi2(self): 44 | selector = SelectKBest(score_func = chi2, k = self.fs_num) 45 | return (selector) 46 | def rfe_lr(self): 47 | estimator = LogisticRegression() 48 | selector = RFE(estimator, n_features_to_select = self.fs_num) 49 | return(selector) 50 | def rfe_svm(self): 51 | estimator = SVC(kernel="linear") 52 | selector = RFE(estimator, n_features_to_select = self.fs_num) 53 | return(selector) 54 | def rfe_tree(self): 55 | estimator = DecisionTreeClassifier() 56 | selector = RFE(estimator, n_features_to_select = self.fs_num) 57 | return(selector) 58 | def rfe_rf(self): 59 | estimator = RandomForestClassifier(max_depth = 3, n_estimators = 5) 60 | selector = RFE(estimator, n_features_to_select = self.fs_num) 61 | return(selector) 62 | def rfecv_svm(self): 63 | estimator = SVC(kernel="linear") 64 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 65 | return(selector) 66 | def rfecv_tree(self): 67 | estimator = DecisionTreeClassifier() 68 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 69 | return(selector) 70 | def rfecv_rf(self): 71 | estimator = RandomForestClassifier(max_depth = 3, n_estimators = 5) 72 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 73 | return(selector) 74 | 75 | 76 | class reg_fs: 77 | """This class stores regression selectors. 78 | 79 | Parameters 80 | ---------- 81 | fs_num : int, default = None 82 | Set the # of features want to select out. 83 | 84 | random_state : int, default = None 85 | Random state value. 86 | 87 | cv : int, default = None 88 | # of folds for cross-validation. 89 | Example 90 | ------- 91 | 92 | .. [Example] 93 | 94 | References 95 | ---------- 96 | None 97 | """ 98 | def __init__(self,fs_num,random_state = None,cv = None): 99 | self.fs_num = fs_num 100 | self.random_state = random_state 101 | self.cv = cv 102 | def kbest_f(self): 103 | selector = SelectKBest(score_func = f_regression, k = self.fs_num) 104 | return (selector) 105 | def rfe_svm(self): 106 | estimator = SVR(kernel="linear") 107 | selector = RFE(estimator, n_features_to_select = self.fs_num) 108 | return(selector) 109 | def rfe_tree(self): 110 | estimator = DecisionTreeRegressor() 111 | selector = RFE(estimator, n_features_to_select = self.fs_num) 112 | return(selector) 113 | def rfe_rf(self): 114 | estimator = RandomForestRegressor(max_depth = 3, n_estimators = 5) 115 | selector = RFE(estimator, n_features_to_select = self.fs_num) 116 | return(selector) 117 | def rfecv_svm(self): 118 | estimator = SVR(kernel="linear") 119 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 120 | return(selector) 121 | def rfecv_tree(self): 122 | estimator = DecisionTreeRegressor() 123 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 124 | return(selector) 125 | def rfecv_rf(self): 126 | estimator = RandomForestRegressor(max_depth = 3, n_estimators = 5) 127 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 128 | return(selector) 129 | 130 | 131 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/reset_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "confirm_reset":"no_confirm", 3 | "space_set": 4 | { 5 | "cls":{ 6 | "lgr":{ 7 | }, 8 | "svm":{ 9 | }, 10 | "mlp":{ 11 | }, 12 | "ada":{ 13 | }, 14 | "rf":{ 15 | }, 16 | "gb":{ 17 | }, 18 | "xgb":{ 19 | }, 20 | "lsvc":{ 21 | }, 22 | "sgd":{ 23 | }, 24 | "hgboost":{ 25 | }, 26 | "rgcv":{ 27 | } 28 | 29 | }, 30 | "reg":{ 31 | "lr":{ 32 | }, 33 | "knn":{ 34 | }, 35 | "svm":{ 36 | }, 37 | "mlp":{ 38 | }, 39 | "ada":{ 40 | }, 41 | "rf":{ 42 | }, 43 | "gb":{ 44 | }, 45 | "xgb":{ 46 | }, 47 | "tree":{ 48 | }, 49 | "sgd":{ 50 | }, 51 | "hgboost":{ 52 | }, 53 | "rgcv":{ 54 | }, 55 | "cvlasso":{ 56 | }, 57 | "huber":{ 58 | } 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/settings.json: -------------------------------------------------------------------------------- 1 | {"confirm_reset": "no_confirm", "space_set": {"cls": {"lgr": {}, "svm": {}, "mlp": {"activation": ["relu"], "hidden_layer_sizes": [10], "learning_rate": ["constant"], "solver": ["sgd"]}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "lsvc": {}, "sgd": {}, "hgboost": {}, "rgcv": {}}, "reg": {"lr": {}, "knn": {}, "svm": {}, "mlp": {}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "tree": {}, "sgd": {}, "hgboost": {}, "rgcv": {}, "cvlasso": {}, "huber": {}}}} -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/settings_script.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | from optimalflow.utilis_func import pipeline_splitting_rule, update_parameters,reset_parameters 4 | 5 | import json 6 | import os 7 | 8 | json_path_s = os.path.join(os.path.dirname("./"), 'settings.json') 9 | with open(json_path_s, encoding='utf-8') as data_file: 10 | para_data = json.load(data_file) 11 | data_file.close() 12 | 13 | reset_flag = para_data['confirm_reset'] 14 | 15 | custom_space = { 16 | "cls_mlp":para_data['space_set']['cls']['mlp'], 17 | "cls_lr":para_data['space_set']['cls']['lgr'], 18 | "cls_svm":para_data['space_set']['cls']['svm'], 19 | "cls_ada":para_data['space_set']['cls']['ada'], 20 | "cls_xgb":para_data['space_set']['cls']['xgb'], 21 | "cls_rgcv":para_data['space_set']['cls']['rgcv'], 22 | "cls_rf":para_data['space_set']['cls']['rf'], 23 | "cls_gb":para_data['space_set']['cls']['gb'], 24 | "cls_lsvc":para_data['space_set']['cls']['lsvc'], 25 | "cls_hgboost":para_data['space_set']['cls']['hgboost'], 26 | "cls_sgd":para_data['space_set']['cls']['sgd'], 27 | "reg_lr":para_data['space_set']['reg']['lr'], 28 | "reg_svm":para_data['space_set']['reg']['svm'], 29 | "reg_mlp":para_data['space_set']['reg']['mlp'], 30 | "reg_ada":para_data['space_set']['reg']['ada'], 31 | "reg_rf":para_data['space_set']['reg']['rf'], 32 | "reg_gb":para_data['space_set']['reg']['gb'], 33 | "reg_xgb":para_data['space_set']['reg']['xgb'], 34 | "reg_tree":para_data['space_set']['reg']['tree'], 35 | "reg_hgboost":para_data['space_set']['reg']['hgboost'], 36 | "reg_rgcv":para_data['space_set']['reg']['rgcv'], 37 | "reg_cvlasso":para_data['space_set']['reg']['cvlasso'], 38 | "reg_huber":para_data['space_set']['reg']['huber'], 39 | "reg_sgd":para_data['space_set']['reg']['sgd'], 40 | "reg_knn":para_data['space_set']['reg']['knn'] 41 | } 42 | 43 | 44 | try: 45 | if(reset_flag == "reset_default"): 46 | reset_parameters() 47 | if(reset_flag == "reset_settings"): 48 | json_s = os.path.join(os.path.dirname("./"), 'reset_settings.json') 49 | with open(json_s,'r') as d_file: 50 | para = json.load(d_file) 51 | json_s = os.path.join(os.path.dirname("./"), 'settings.json') 52 | w_file = open(json_s, "w",encoding='utf-8') 53 | w_file. truncate(0) 54 | json.dump(para, w_file) 55 | w_file.close() 56 | if(reset_flag == "no_confirm"): 57 | reset_parameters() 58 | for i in custom_space.keys(): 59 | if custom_space[i]!={}: 60 | model_type, algo_name=i.split('_') 61 | update_parameters(mode = model_type,estimator_name=algo_name,**custom_space[i]) 62 | except: 63 | print("Failed to Set Up the Searching Space, will Use the Default Settings!") -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.5.2 (https://getbootstrap.com/) 3 | * Copyright 2011-2020 The Bootstrap Authors 4 | * Copyright 2011-2020 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/css/heroic-features.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Heroic Features (https://startbootstrap.com/templates/heroic-features) 3 | * Copyright 2013-2020 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-heroic-features/blob/master/LICENSE) 5 | */ 6 | body { 7 | padding-top: 56px; 8 | } 9 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/img/OptimalFlow_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/build/lib/optimalflow/webapp/static/img/OptimalFlow_Logo.png -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/img/OptimalFlow_Workflow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/build/lib/optimalflow/webapp/static/img/OptimalFlow_Workflow.PNG -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/img/Profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/build/lib/optimalflow/webapp/static/img/Profile.jpg -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/img/no-cls-output.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block body %} 6 |
7 |

Currently only support Pipeline Cluster Retrieval Diagram for Classification Problem...

8 | 9 |

You can connect with me on my LinkedIn or GitHub.

10 |
11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/static/js/dependent-selects.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * dependent-selects 4 | * 5 | * Show filtered options on one select field depending on another 6 | * See in action https://codepen.io/furalyon/pen/NzrXZL 7 | * 8 | * By Ramkishore Manorahan - @furalyon 9 | * 10 | * 11 | * To use: 12 | * 1. Include this script 13 | * 2. Use the markup format as shown in the example.html 14 | * 15 | * usage eg: 16 | 17 | Parent 1: 22 | 23 | Child 1: 31 | 32 | * 33 | * Note: A page can have multiple sets of this 34 | * 35 | */ 36 | 37 | 38 | var handle_dependent_selects = function($parent) { 39 | var $child = document.getElementById($parent.getAttribute('data-child-id')), 40 | $selected = $parent.options[$parent.selectedIndex], 41 | parent_val = $selected.value; 42 | 43 | for (var i=0; i<$child.options.length; i++) { 44 | var $option = $child.options[i]; 45 | if($option.value != '') { 46 | $option.setAttribute('hidden',true); 47 | } 48 | }; 49 | 50 | if(parent_val) { 51 | var child_options = $selected.getAttribute('data-child-options'), 52 | child_options_array = child_options.split('|#'); 53 | 54 | for (i=0; i<$child.options.length; i++) { 55 | var $option = $child.options[i]; 56 | if ($option.value == "") { 57 | $option.innerText = "--------"; 58 | continue; 59 | } 60 | if(child_options_array.indexOf($option.value) != -1) { 61 | $option.removeAttribute('hidden'); 62 | } 63 | }; 64 | 65 | } else { 66 | var show_text = $child.getAttribute('data-text-if-parent-empty'); 67 | if(!show_text) { 68 | show_text = 'Select ' + $parent.name; 69 | } 70 | for (i=0; i<$child.options.length; i++) { 71 | var $option = $child.options[$child.selectedIndex]; 72 | if ($option.value == "") { 73 | $option.innerText = '- ' + show_text + ' -'; 74 | break; 75 | } 76 | }; 77 | } 78 | } 79 | 80 | document.addEventListener('DOMContentLoaded', function() { 81 | var $parents = document.getElementsByClassName('dependent-selects__parent'); 82 | for (var i=0; i<$parents.length; i++) { 83 | handle_dependent_selects($parents[i]); 84 | $parents[i].addEventListener('change', function() { 85 | handle_dependent_selects(this) 86 | }) 87 | } 88 | }, false); -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow About Author{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

About Me

8 |

9 |

I am a healthcare & pharmaceutical data scientist and big data Analytics & AI enthusiast, living in Boston area.

10 |

In my spare time, I developed OptimalFlow library to help data scientists building optimal models in an easy way, and automate Machine Learning workflow with simple codes.

11 |

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.

12 |

You can connect with me on my LinkedIn or GitHub.

13 |
14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %} {% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 48 | 49 | 50 | {% block body %} 51 | 52 | 53 | {% endblock %} 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/docs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Documentation{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Documentation

9 |

Find Official OptimalFlow Manual Docs Here:

10 | 11 |
12 | 13 |
14 |
15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/logs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Logs Viewer{% endblock %} 4 | 5 | {% block body %} 6 | 7 |
8 |

9 |

Logs Viewer

10 |

Quickly Check the Logs of OptimalFlow, which is Supported by autoFlow Module.

11 | 12 |
13 | 14 | 20 |
21 | 22 |

23 | 24 |

25 |
26 | 27 |
28 |
29 |

30 | 31 |

32 |
33 | 34 |
35 | {% if log_flag %} 36 | 37 | {% else %} 38 | 39 | {% endif %} 40 |
41 |
42 | 43 |
44 | 45 |

46 | 47 |

48 |
49 | 50 | 56 | 57 | 58 | 59 | 60 | 61 | {% endblock %} 62 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/nologfile.html: -------------------------------------------------------------------------------- 1 |
2 |

Select the Log File Above, and Click the Button to Review.

3 |

NOTE: The Logs Files Will Only be Available When You've Done the PCTE Workflow Step.

4 |
-------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/templates/viz.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Visualization{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Visualization

9 |

Quickly Generate PCTE Model Evaluation Report or Retrieval Diagram, which are Supported by autoViz Module.

10 | 11 |
12 | 13 |
14 |

You can find more use demos from Documentation or from OptimalFlow's GitHub.

15 |
16 | 17 |
18 |
19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /build/lib/optimalflow/webapp/webapp.json: -------------------------------------------------------------------------------- 1 | {"autoFS": {"feature_num": "8", "model_type_fs": "cls", "algo_fs": ["kbest_f", "rfe_lr"]}, "autoPP": {"scaler": ["None", "standard"], "encode_band": "4", "low_encode": ["onehot", "label"], "high_encode": ["frequency", "mean"], "winsorizer": ["0.05", "0.1"], "sparsity": "0.46", "cols": "1000", "model_type_pp": "cls"}, "autoCV": {"model_type_cv": "cls", "method_cv": "fastClassifier", "algo_cv": ["lgr", "mlp"]}, "label_col": "diagnosis", "filename": "breast_cancer.csv"} -------------------------------------------------------------------------------- /dist/optimalflow-0.1.11-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/dist/optimalflow-0.1.11-py3-none-any.whl -------------------------------------------------------------------------------- /dist/optimalflow-0.1.11.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/dist/optimalflow-0.1.11.tar.gz -------------------------------------------------------------------------------- /docs/Learning_Curve_Compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Learning_Curve_Compare.png -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/OptimalFlow-WebApp-slow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow-WebApp-slow.gif -------------------------------------------------------------------------------- /docs/OptimalFlow_Components.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow_Components.PNG -------------------------------------------------------------------------------- /docs/OptimalFlow_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow_Logo.png -------------------------------------------------------------------------------- /docs/OptimalFlow_Omni-ensemble_and_Scalable_Automated_Machine_Learning.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow_Omni-ensemble_and_Scalable_Automated_Machine_Learning.pdf -------------------------------------------------------------------------------- /docs/OptimalFlow_Workflow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow_Workflow.PNG -------------------------------------------------------------------------------- /docs/OptimalFlow_logo_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/OptimalFlow_logo_transparent.png -------------------------------------------------------------------------------- /docs/PCA-based_feature_preprocessor.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/PCA-based_feature_preprocessor.PNG -------------------------------------------------------------------------------- /docs/Parallel_Coordinates_Plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Parallel_Coordinates_Plot.png -------------------------------------------------------------------------------- /docs/Parallel_Coordinates_Plot_before_PCTE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Parallel_Coordinates_Plot_before_PCTE.png -------------------------------------------------------------------------------- /docs/Parallel_coordinates_compare.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Parallel_coordinates_compare.PNG -------------------------------------------------------------------------------- /docs/PipelineClusterTraversalExperiments.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/PipelineClusterTraversalExperiments.PNG -------------------------------------------------------------------------------- /docs/SinglePipelineRepetitiveExperiments.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/SinglePipelineRepetitiveExperiments.PNG -------------------------------------------------------------------------------- /docs/Webapp-Documentation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Webapp-Documentation.PNG -------------------------------------------------------------------------------- /docs/Webapp-LogsViewer.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Webapp-LogsViewer.PNG -------------------------------------------------------------------------------- /docs/Webapp-PCTE.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/Webapp-PCTE.PNG -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Contributers 3 | ============ 4 | 5 | Original Author 6 | ---------------- 7 | * Tony Dong 8 | I am a healthcare & pharmaceutical data scientist and big data Analytics & AI enthusiast, living in Boston area. In my spare time, I developed OptimalFlow library to help data scientists building optimal models in an easy way, and automate Machine Learning workflow with simple codes.

9 | 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.

10 | You can connect with me on my LinkedIn or GitHub 11 | 12 | Contributors 13 | ------------ 14 | 15 | * Send email to to join. 16 | -------------------------------------------------------------------------------- /docs/autoFS.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | autoFS Module 3 | ============= 4 | 5 | Description : 6 | - This module is used for features selection: 7 | * Automate the feature selection with several selectors 8 | * Evaluate the outputs from all selector methods, and ranked a final list of the top important features 9 | 10 | .. image:: Parallel_Coordinates_Plot.png 11 | :width: 980 12 | 13 | - Class: 14 | * dynaFS_clf : Focus on classification problems 15 | - fit() - fit and transform method for classifier 16 | * dynaFS_reg : Focus on regression problems 17 | - fit() - fit and transform method for regressor 18 | 19 | - Current available selectors 20 | * clf_fs : Class focusing on classification features selection 21 | - kbest_f : SelectKBest() with f_classif core 22 | - kbest_chi2 - SelectKBest() with chi2 core 23 | - rfe_lr - RFE with LogisticRegression() estimator 24 | - rfe_svm - RFE with SVC() estimator 25 | - rfecv_svm - RFECV with SVC() estimator 26 | - rfe_tree - RFE with DecisionTreeClassifier() estimator 27 | - rfecv_tree - RFECV with DecisionTreeClassifier() estimator 28 | - rfe_rf - RFE with RandomForestClassifier() estimator 29 | - rfecv_rf - RFECV with RandomForestClassifier() estimator 30 | 31 | * reg_fs : Class focusing on regression features selection 32 | - kbest_f : SelectKBest() with f_regression core 33 | - rfe_svm : RFE with SVC() estimator 34 | - rfecv_svm : RFECV with SVC() estimator 35 | - rfe_tree : RFE with DecisionTreeRegressor() estimator 36 | - rfecv_tree : RFECV with DecisionTreeRegressor() estimator 37 | - rfe_rf : RFE with RandomForestRegressor() estimator 38 | - rfecv_rf : RFECV with RandomForestRegressor() estimator 39 | 40 | dynaFS_clf 41 | --------------------- 42 | 43 | .. autoclass:: optimalflow.autoFS.dynaFS_clf 44 | :members: 45 | 46 | dynaFS_reg 47 | --------------------- 48 | 49 | .. autoclass:: optimalflow.autoFS.dynaFS_reg 50 | :members: 51 | 52 | clf_fs 53 | --------------------- 54 | 55 | .. autoclass:: optimalflow.selectorFS.clf_fs 56 | 57 | reg_fs 58 | --------------------- 59 | 60 | .. autoclass:: optimalflow.selectorFS.reg_fs 61 | -------------------------------------------------------------------------------- /docs/autoFlow.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | autoFlow Module 3 | ============= 4 | 5 | Description : 6 | - This module is used for logging & model tracking: 7 | * Log and retrieve each module's operation history & intermediate results; 8 | * Using this module as the open interface for further interactive model tracking development. 9 | 10 | Here're samples of each module's log file: 11 | - autoCV module: 12 | https://raw.githubusercontent.com/tonyleidong/OptimalFlow/master/docs/autoCV_log_2020.08.07.17.28.34.log 13 | - autoFS module: 14 | https://raw.githubusercontent.com/tonyleidong/OptimalFlow/master/docs/autoFS_log_2020.07.16.12.25.48.log 15 | - autoPP module: 16 | https://raw.githubusercontent.com/tonyleidong/OptimalFlow/master/docs/autoPP_log_2020.08.07.17.28.34.log 17 | - autoPipe module: 18 | https://raw.githubusercontent.com/tonyleidong/OptimalFlow/master/docs/autoPipe_log_2020.08.07.17.28.34.log 19 | 20 | -------------------------------------------------------------------------------- /docs/autoPP.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | autoPP Module 3 | ============= 4 | 5 | Description : 6 | - This module is used for data preprocessing operation: 7 | * Impute with missing value 8 | * Winsorize with outlier 9 | * Scaling using popular scaler approaches 10 | * Encoding category features using popular encoder approaches 11 | * Generated all combination datasets for further modeling and evaluation 12 | * Sparsity calculation as the critera for output datasets filtering 13 | * Custom parameters initial settings, add/remove winsorization, scaling, or encoding strategies. 14 | 15 | - Class: 16 | * dynaPreprocessing : Focus on classification/regression prprocessing problems 17 | - fit() - fit & transform method for preprocessing 18 | 19 | - Current available strategies: 20 | * Scaling : Numeric features scaling, default settings 21 | (NOTE: When you select 'None', might cause overfitting with too high R-Squared Score in Regression Problem) 22 | - "None" : None approach involve in scaling step 23 | - "standard" : StandardScaler() approach 24 | - "minmax" - MinMaxScaler() approach 25 | - "maxabs" - MaxAbsScaler() approach 26 | - "robust" - RobustScaler() approach 27 | 28 | * Encoding : Category features encoding, default settings 29 | - "onehot" : OnehotEncoder() approach, with dummy trap consideration in regression problem 30 | - "label" : LabelEncoder() approach 31 | - "frequency" : Frequency calculation approach 32 | - "mean" : Mean calculation approach 33 | 34 | * winsorization : Default limits settings 35 | - (0.01,0.01) : Top 1% and bottom 1% will be excluded 36 | - (0.05,0.05) : Top 5% and bottom 5% will be excluded 37 | 38 | dynapipePreprocessing 39 | --------------------- 40 | 41 | .. autoclass:: optimalflow.autoPP.dynaPreprocessing 42 | :members: 43 | 44 | PPtools 45 | ------- 46 | 47 | .. autoclass:: optimalflow.funcPP.PPtools 48 | :members: -------------------------------------------------------------------------------- /docs/autoPipe.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | autoPipe Module 3 | =============== 4 | 5 | Description : 6 | - This module is used to build *Pipeline Cluster Traversal Experiments*: 7 | * Create sequential components of *Pipeline Cluster Traversal Experiments* 8 | * Apply traversal experiments through pipeline cluster to find the best baseline model 9 | * Generate comparable and parameter-tracable dictionaies and reports to support autoVIZ and autoFlow modules 10 | 11 | - Build Steps: 12 | * autoPP - dynaPreprocessing() Class in autoPP module 13 | * Datasets Splitting - pipeline_splitting_rule() Function in utilis_funs module 14 | * autoFS - dynaFS_clf() or dynaFS_reg() Class in autoFS module 15 | * autoCV - dynaClassifier() or dynaRegressor() Class in autoCV module 16 | * Model Evaluate - evaluate_model() Class in autoCV module 17 | 18 | .. image:: PipelineClusterTraversalExperiments.PNG 19 | :width: 980 20 | 21 | autoPipe 22 | --------------------- 23 | 24 | .. automodule:: optimalflow.autoPipe 25 | :members: 26 | -------------------------------------------------------------------------------- /docs/autoViz.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | autoViz Module 3 | ============== 4 | 5 | Description : 6 | - This module is used for outputs visualization: 7 | * Visualize and retrieve each pipeline's generating steps & performance; 8 | * Using this module as the open interface for further interactive visualization development. 9 | 10 | autoViz 11 | --------------------- 12 | 13 | .. automodule:: optimalflow.autoViz 14 | :members: 15 | 16 | -------------------------------------------------------------------------------- /docs/autoViz_Demo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/autoViz_Demo.PNG -------------------------------------------------------------------------------- /docs/autoViz_Demo_Dynamic_Table.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/autoViz_Demo_Dynamic_Table.PNG -------------------------------------------------------------------------------- /docs/autoViz_Demo_Model_Retrieval_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/autoViz_Demo_Model_Retrieval_Diagram.png -------------------------------------------------------------------------------- /docs/comparison_table.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/comparison_table.PNG -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | import os 14 | import sys 15 | # sys.path.insert(0, os.path.abspath('..')) 16 | 17 | sys.path.append(os.path.join(os.path.abspath(os.pardir))) 18 | autodoc_mock_imports = ['category_encoders','IPython','xgboost','plotly'] 19 | 20 | # Get the project root dir, which is the parent dir of this 21 | cwd = os.getcwd() 22 | project_root = os.path.dirname(cwd) 23 | 24 | # Insert the project root dir as the first element in the PYTHONPATH. 25 | # This lets us ensure that the source package is imported, and that its 26 | # version is used. 27 | sys.path.insert(0, project_root) 28 | 29 | 30 | 31 | 32 | 33 | # -- Project information ----------------------------------------------------- 34 | 35 | project = 'Optimal Flow' 36 | copyright = '2020, Tony Dong' 37 | author = 'Tony Dong' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # -- General configuration --------------------------------------------------- 43 | 44 | # Add any Sphinx extension module names here, as strings. They can be 45 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 46 | # ones. 47 | extensions = [ 48 | 'sphinx.ext.autodoc', 49 | 'sphinx.ext.coverage', 50 | 'sphinx.ext.napoleon', 51 | 'sphinx.ext.autosummary', 52 | 'sphinx.ext.doctest', 53 | 'sphinx.ext.mathjax', 54 | 'sphinx.ext.githubpages', 55 | 'sphinx.ext.viewcode', 56 | ] 57 | 58 | # Add any paths that contain templates here, relative to this directory. 59 | templates_path = ['_templates'] 60 | 61 | # List of patterns, relative to source directory, that match files and 62 | # directories to ignore when looking for source files. 63 | # This pattern also affects html_static_path and html_extra_path. 64 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 65 | 66 | 67 | # -- Options for HTML output ------------------------------------------------- 68 | 69 | # The theme to use for HTML and HTML Help pages. See the documentation for 70 | # a list of builtin themes. 71 | # 72 | #html_theme = 'sphinx_rtd_theme' 73 | html_theme = 'nature' 74 | # html_show_sourcelink = True 75 | 76 | # Add any paths that contain custom static files (such as style sheets) here, 77 | # relative to this directory. They are copied after the builtin static files, 78 | # so a file named "default.css" will overwrite the builtin "default.css". 79 | html_static_path = ['_static'] 80 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | History 3 | ======= 4 | 5 | 0.1.11 (2020-09-29) 6 | ------------------ 7 | * Added SearchinSpace settings page in Web App. Users could custom set estimators/regressors' parameters for optimal tuning outputs. 8 | * Modified some layouts of existing pages in Web App. 9 | 10 | 0.1.10 (2020-09-16) 11 | ------------------ 12 | * Created a Web App, based on flask framework, as OptimalFlow's GUI. Users could build Automated Machine Learning workflow all clicks, without any coding at all! 13 | * Web App included PCTE workflow bulder, LogsViewer, Visualization, Documentation sections. 14 | * Fix the filename issues in autoViz module, and remove auto_open function when generating new html format plots. 15 | 16 | 0.1.7 (2020-08-31) 17 | ------------------ 18 | * Modify autoPP's default_parameters: Remove "None" in "scaler", modify "sparsity" : [0.50], modify "cols" : [100] 19 | * Modify autoViz clf_table_report()'s coloring settings 20 | * Fix bugs in autoViz reg_table_report()'s gradient coloring function 21 | 22 | 0.1.6 (2020-08-28) 23 | ------------------ 24 | * Remove evaluate_model() function's round() bugs in coping with classification problem 25 | * Move out SVM based algorithm from fastClassifier & fastRegressor's default estimators settings 26 | * Move out SVM based algorithm from autoFS class's default selectors settings 27 | 28 | 0.1.5 (2020-08-26) 29 | ------------------ 30 | * Fix evaluate_model() function's bugs in coping with regression problem 31 | * Add reg_table_report() function to create dynamic table report for regression problem in autoViz 32 | 33 | 0.1.4 (2020-08-24) 34 | ------------------ 35 | * Fix evaluate_model() function's precision_score issue when running modelmulti-class classification problems 36 | * Add custom_selectors args for customized algorithm settings with autoFS's 2 classes(dynaFS_reg, dynaFS_clf) 37 | 38 | 0.1.3 (2020-08-20) 39 | ------------------ 40 | * Add Dynamic Table for Pipeline Cluster Model Evaluation Report in autoViz module 41 | * Add custom_estimators args for customized algorithm settings with autoCV's 4 classes(dynaClassifier,dynaRegressor,fastClassifier, and fastRegressor) 42 | 43 | 0.1.2 (2020-08-14) 44 | ------------------ 45 | 46 | * Add *fastClassifier*, and *fastRegressor* class which are both random parameter search based 47 | * Modify the display settings when using dynaClassifier in non in_pipeline mode 48 | 49 | 0.1.1 (2020-08-10) 50 | ------------------ 51 | 52 | * Add classifiers: LinearSVC, HistGradientBoostingClassifier, SGDClassifier, RidgeClassifierCV. 53 | * Modify Readme.md file. 54 | 55 | 0.1.0 (2020-08-10) 56 | ------------------ 57 | 58 | * First release on PyPI. -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Installation 5 | ============ 6 | 7 | 8 | 9 | To install OptimalFlow's latest version, run this command in your terminal: 10 | 11 | .. code-block:: console 12 | 13 | $ pip install --upgrade optimalflow 14 | 15 | This is the preferred method to install OptimalFlow, as it will always install the most recent stable release. 16 | 17 | You can find more details about the package info at PYPI 18 | -------------------------------------------------------------------------------- /docs/issues.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============= 4 | Report Issues 5 | ============= 6 | 7 | Report Issues at https://github.com/tonyleidong/OptimalFlow/issues. 8 | 9 | If you are reporting a bug, please include: 10 | 11 | * Your operating system name and version. 12 | * Any details about your local setup that might be helpful in troubleshooting. 13 | * Detailed steps to reproduce the bug. 14 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/model_selection_algorithms.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/model_selection_algorithms.PNG -------------------------------------------------------------------------------- /docs/parallel_coordinates_comparison.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/parallel_coordinates_comparison.PNG -------------------------------------------------------------------------------- /docs/parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}} -------------------------------------------------------------------------------- /docs/preprocessing_algorithms.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/preprocessing_algorithms.PNG -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | scikit-learn==0.23.1 2 | scipy==1.5.1 3 | statsmodels==0.11.1 4 | pandas==1.0.5 5 | joblib==0.16.0 6 | plotly==4.9.0 7 | -------------------------------------------------------------------------------- /docs/reset_parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}} -------------------------------------------------------------------------------- /docs/selection-based_feature_preprocessor_with_ensemble_encoding.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/selection-based_feature_preprocessor_with_ensemble_encoding.PNG -------------------------------------------------------------------------------- /docs/webapp-SearchingSpace.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-SearchingSpace.PNG -------------------------------------------------------------------------------- /docs/webapp-SearchingSpaceSet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-SearchingSpaceSet.png -------------------------------------------------------------------------------- /docs/webapp-Visualization.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-Visualization.PNG -------------------------------------------------------------------------------- /docs/webapp-deployment-0.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-deployment-0.PNG -------------------------------------------------------------------------------- /docs/webapp-deployment-1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-deployment-1.PNG -------------------------------------------------------------------------------- /docs/webapp-deployment-2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-deployment-2.PNG -------------------------------------------------------------------------------- /docs/webapp-deployment-3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-deployment-3.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-end-run.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-end-run.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-initial.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-initial.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-load-data.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-load-data.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-set-autoCV.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-set-autoCV.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-set-autoFS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-set-autoFS.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-set-autoPP.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-set-autoPP.PNG -------------------------------------------------------------------------------- /docs/webapp-pcte-start-run.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/docs/webapp-pcte-start-run.PNG -------------------------------------------------------------------------------- /logs/autoCV_log_2020.08.14.16.17.42.log: -------------------------------------------------------------------------------- 1 | 14/08 16:17:42 - INFO - ##################################################################################################################################################################################################################################################################### 2 | 14/08 16:17:42 - INFO - Optimal Flow - autoCV - Auto Model Selection w/ Cross Validation :: 2020.08.14.16.17.42 3 | 14/08 16:17:42 - INFO - ##################################################################################################################################################################################################################################################################### 4 | 14/08 16:17:42 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 14/08 16:17:42 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 14/08 16:17:42 - INFO - ------------------------------------------------------------ 7 | 14/08 16:17:42 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 14/08 16:17:42 - INFO - Deleted file:autoCV_log_2020.08.07.20.10.34.log 9 | 14/08 16:17:42 - INFO - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /optimalflow.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | HISTORY.rst 2 | LICENSE 3 | MANIFEST.in 4 | README.md 5 | setup.py 6 | optimalflow/__init__.py 7 | optimalflow/autoCV.py 8 | optimalflow/autoFS.py 9 | optimalflow/autoPP.py 10 | optimalflow/autoPipe.py 11 | optimalflow/autoViz.py 12 | optimalflow/estimatorCV.py 13 | optimalflow/funcPP.py 14 | optimalflow/parameters.json 15 | optimalflow/reset_parameters.json 16 | optimalflow/selectorFS.py 17 | optimalflow/utilis_func.py 18 | optimalflow.egg-info/PKG-INFO 19 | optimalflow.egg-info/SOURCES.txt 20 | optimalflow.egg-info/dependency_links.txt 21 | optimalflow.egg-info/requires.txt 22 | optimalflow.egg-info/top_level.txt 23 | optimalflow/webapp/app.py 24 | optimalflow/webapp/reset_settings.json 25 | optimalflow/webapp/settings.json 26 | optimalflow/webapp/settings_script.py 27 | optimalflow/webapp/webapp.json 28 | optimalflow/webapp/webapp_script.py 29 | optimalflow/webapp/input/breast_cancer.csv 30 | optimalflow/webapp/static/css/bootstrap-grid.css 31 | optimalflow/webapp/static/css/bootstrap-grid.css.map 32 | optimalflow/webapp/static/css/bootstrap-grid.min.css 33 | optimalflow/webapp/static/css/bootstrap-grid.min.css.map 34 | optimalflow/webapp/static/css/bootstrap-reboot.css 35 | optimalflow/webapp/static/css/bootstrap-reboot.css.map 36 | optimalflow/webapp/static/css/bootstrap-reboot.min.css 37 | optimalflow/webapp/static/css/bootstrap-reboot.min.css.map 38 | optimalflow/webapp/static/css/bootstrap.css 39 | optimalflow/webapp/static/css/bootstrap.css.map 40 | optimalflow/webapp/static/css/bootstrap.min.css 41 | optimalflow/webapp/static/css/bootstrap.min.css.map 42 | optimalflow/webapp/static/css/heroic-features.css 43 | optimalflow/webapp/static/img/OptimalFlow_Logo.png 44 | optimalflow/webapp/static/img/OptimalFlow_Workflow.PNG 45 | optimalflow/webapp/static/img/Profile.jpg 46 | optimalflow/webapp/static/img/no-cls-output.html 47 | optimalflow/webapp/static/js/bootstrap.bundle.js 48 | optimalflow/webapp/static/js/bootstrap.bundle.js.map 49 | optimalflow/webapp/static/js/bootstrap.bundle.min.js 50 | optimalflow/webapp/static/js/bootstrap.bundle.min.js.map 51 | optimalflow/webapp/static/js/bootstrap.js 52 | optimalflow/webapp/static/js/bootstrap.js.map 53 | optimalflow/webapp/static/js/bootstrap.min.js 54 | optimalflow/webapp/static/js/bootstrap.min.js.map 55 | optimalflow/webapp/static/js/dependent-selects.js 56 | optimalflow/webapp/templates/about.html 57 | optimalflow/webapp/templates/base.html 58 | optimalflow/webapp/templates/diagram.html 59 | optimalflow/webapp/templates/docs.html 60 | optimalflow/webapp/templates/index.html 61 | optimalflow/webapp/templates/logfile.html 62 | optimalflow/webapp/templates/logs.html 63 | optimalflow/webapp/templates/nologfile.html 64 | optimalflow/webapp/templates/parameters.html 65 | optimalflow/webapp/templates/report.html 66 | optimalflow/webapp/templates/viz.html -------------------------------------------------------------------------------- /optimalflow.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /optimalflow.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | scikit-learn 3 | statsmodels 4 | scipy 5 | joblib 6 | category_encoders 7 | plotly 8 | flask 9 | wtforms 10 | werkzeug 11 | matplotlib 12 | -------------------------------------------------------------------------------- /optimalflow.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | optimalflow 2 | -------------------------------------------------------------------------------- /optimalflow/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | __author__ = 'Tony Dong' 3 | __email__ = 'tonyleidong@gmail.com' 4 | __version__ = '0.1.11' 5 | -------------------------------------------------------------------------------- /optimalflow/parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]},"rgcv":{"fit_intercept":["False","True"]},"hgboost":{"max_depth":[3, 5, 7, 9],"learning_rate":[0.1, 0.2,0.3,0.4]} ,"lsvc": {"C": [0.1, 1, 10]},"sgd": {"penalty":["l1","l2","elasticnet"]},"svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}, "sgd": {"shuffle": ["True", "False"], "penalty": ["l2", "l1", "elasticnet"], "learning_rate": ["constant", "optimal", "invscaling"]}, "cvlasso": {"fit_intercept": ["True", "False"]}, "rgcv": {"fit_intercept": ["True", "False"]}, "huber": {"fit_intercept": ["True", "False"]}, "hgboost": {"max_depth": [3, 5, 7, 9], "learning_rate": [0.1, 0.2, 0.3, 0.4]}}} -------------------------------------------------------------------------------- /optimalflow/reset_parameters.json: -------------------------------------------------------------------------------- 1 | {"cls": {"lgr": {"C": [0.001, 0.01, 0.1, 1, 10, 100, 1000]},"rgcv":{"fit_intercept":["False","True"]},"hgboost":{"max_depth":[3, 5, 7, 9],"learning_rate":[0.1, 0.2,0.3,0.4]} ,"lsvc": {"C": [0.1, 1, 10]},"sgd": {"penalty":["l1","l2","elasticnet"]},"svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "sgd", "adam"]}, "ada": {"n_estimators": [50, 100, 150], "learning_rate": [0.1, 1, 10, 100]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [1, 3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}}, "reg": {"lr": {"normalize": ["True", "False"]}, "knn": {"algorithm": ["auto", "ball_tree", "kd_tree", "brute"], "n_neighbors": [5, 10, 15, 20, 25], "weights": ["uniform", "distance"]}, "svm": {"kernel": ["linear", "poly", "rbf", "sigmoid"], "C": [0.1, 1, 10]}, "mlp": {"hidden_layer_sizes": [10, 50, 100], "activation": ["identity", "relu", "tanh", "logistic"], "learning_rate": ["constant", "invscaling", "adaptive"], "solver": ["lbfgs", "adam"]}, "rf": {"n_estimators": [5, 50, 250], "max_depth": [2, 4, 8, 16, 32]}, "gb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "tree": {"splitter": ["best", "random"], "max_depth": [1, 3, 5, 7, 9], "min_samples_leaf": [1, 3, 5]}, "ada": {"n_estimators": [50, 100, 150, 200, 250, 300], "loss": ["linear", "square", "exponential"], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4]}, "xgb": {"n_estimators": [50, 100, 150, 200, 250, 300], "max_depth": [3, 5, 7, 9], "learning_rate": [0.01, 0.1, 0.2, 0.3, 0.4], "verbosity": [0]}, "sgd": {"shuffle": ["True", "False"], "penalty": ["l2", "l1", "elasticnet"], "learning_rate": ["constant", "optimal", "invscaling"]}, "cvlasso": {"fit_intercept": ["True", "False"]}, "rgcv": {"fit_intercept": ["True", "False"]}, "huber": {"fit_intercept": ["True", "False"]}, "hgboost": {"max_depth": [3, 5, 7, 9], "learning_rate": [0.1, 0.2, 0.3, 0.4]}}} -------------------------------------------------------------------------------- /optimalflow/selectorFS.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import pandas as pd 4 | from sklearn.feature_selection import SelectKBest, chi2, RFE,RFECV, f_regression, f_classif 5 | from sklearn.svm import SVC, SVR 6 | from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor 7 | from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor 8 | from sklearn.linear_model import LogisticRegression 9 | 10 | import warnings 11 | warnings.filterwarnings('ignore', category=FutureWarning) 12 | warnings.filterwarnings('ignore', category=DeprecationWarning) 13 | 14 | class clf_fs: 15 | """This class stores classification selectors. 16 | 17 | Parameters 18 | ---------- 19 | fs_num : int, default = None 20 | Set the # of features want to select out. 21 | 22 | random_state : int, default = None 23 | Random state value. 24 | 25 | cv : int, default = None 26 | # of folds for cross-validation. 27 | Example 28 | ------- 29 | 30 | .. [Example] 31 | 32 | References 33 | ---------- 34 | None 35 | """ 36 | def __init__(self,fs_num = None ,random_state = None,cv = None): 37 | self.fs_num = fs_num 38 | self.random_state = random_state 39 | self.cv = cv 40 | def kbest_f(self): 41 | selector = SelectKBest(score_func = f_classif, k = self.fs_num) 42 | return (selector) 43 | def kbest_chi2(self): 44 | selector = SelectKBest(score_func = chi2, k = self.fs_num) 45 | return (selector) 46 | def rfe_lr(self): 47 | estimator = LogisticRegression() 48 | selector = RFE(estimator, n_features_to_select = self.fs_num) 49 | return(selector) 50 | def rfe_svm(self): 51 | estimator = SVC(kernel="linear") 52 | selector = RFE(estimator, n_features_to_select = self.fs_num) 53 | return(selector) 54 | def rfe_tree(self): 55 | estimator = DecisionTreeClassifier() 56 | selector = RFE(estimator, n_features_to_select = self.fs_num) 57 | return(selector) 58 | def rfe_rf(self): 59 | estimator = RandomForestClassifier(max_depth = 3, n_estimators = 5) 60 | selector = RFE(estimator, n_features_to_select = self.fs_num) 61 | return(selector) 62 | def rfecv_svm(self): 63 | estimator = SVC(kernel="linear") 64 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 65 | return(selector) 66 | def rfecv_tree(self): 67 | estimator = DecisionTreeClassifier() 68 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 69 | return(selector) 70 | def rfecv_rf(self): 71 | estimator = RandomForestClassifier(max_depth = 3, n_estimators = 5) 72 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 73 | return(selector) 74 | 75 | 76 | class reg_fs: 77 | """This class stores regression selectors. 78 | 79 | Parameters 80 | ---------- 81 | fs_num : int, default = None 82 | Set the # of features want to select out. 83 | 84 | random_state : int, default = None 85 | Random state value. 86 | 87 | cv : int, default = None 88 | # of folds for cross-validation. 89 | Example 90 | ------- 91 | 92 | .. [Example] 93 | 94 | References 95 | ---------- 96 | None 97 | """ 98 | def __init__(self,fs_num,random_state = None,cv = None): 99 | self.fs_num = fs_num 100 | self.random_state = random_state 101 | self.cv = cv 102 | def kbest_f(self): 103 | selector = SelectKBest(score_func = f_regression, k = self.fs_num) 104 | return (selector) 105 | def rfe_svm(self): 106 | estimator = SVR(kernel="linear") 107 | selector = RFE(estimator, n_features_to_select = self.fs_num) 108 | return(selector) 109 | def rfe_tree(self): 110 | estimator = DecisionTreeRegressor() 111 | selector = RFE(estimator, n_features_to_select = self.fs_num) 112 | return(selector) 113 | def rfe_rf(self): 114 | estimator = RandomForestRegressor(max_depth = 3, n_estimators = 5) 115 | selector = RFE(estimator, n_features_to_select = self.fs_num) 116 | return(selector) 117 | def rfecv_svm(self): 118 | estimator = SVR(kernel="linear") 119 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 120 | return(selector) 121 | def rfecv_tree(self): 122 | estimator = DecisionTreeRegressor() 123 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 124 | return(selector) 125 | def rfecv_rf(self): 126 | estimator = RandomForestRegressor(max_depth = 3, n_estimators = 5) 127 | selector = RFECV(estimator, min_features_to_select = self.fs_num, cv = self.cv) 128 | return(selector) 129 | 130 | 131 | -------------------------------------------------------------------------------- /optimalflow/webapp/reset_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "confirm_reset":"no_confirm", 3 | "space_set": 4 | { 5 | "cls":{ 6 | "lgr":{ 7 | }, 8 | "svm":{ 9 | }, 10 | "mlp":{ 11 | }, 12 | "ada":{ 13 | }, 14 | "rf":{ 15 | }, 16 | "gb":{ 17 | }, 18 | "xgb":{ 19 | }, 20 | "lsvc":{ 21 | }, 22 | "sgd":{ 23 | }, 24 | "hgboost":{ 25 | }, 26 | "rgcv":{ 27 | } 28 | 29 | }, 30 | "reg":{ 31 | "lr":{ 32 | }, 33 | "knn":{ 34 | }, 35 | "svm":{ 36 | }, 37 | "mlp":{ 38 | }, 39 | "ada":{ 40 | }, 41 | "rf":{ 42 | }, 43 | "gb":{ 44 | }, 45 | "xgb":{ 46 | }, 47 | "tree":{ 48 | }, 49 | "sgd":{ 50 | }, 51 | "hgboost":{ 52 | }, 53 | "rgcv":{ 54 | }, 55 | "cvlasso":{ 56 | }, 57 | "huber":{ 58 | } 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /optimalflow/webapp/settings.json: -------------------------------------------------------------------------------- 1 | {"confirm_reset": "no_confirm", "space_set": {"cls": {"lgr": {}, "svm": {}, "mlp": {"activation": ["relu"], "hidden_layer_sizes": [10], "learning_rate": ["constant"], "solver": ["sgd"]}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "lsvc": {}, "sgd": {}, "hgboost": {}, "rgcv": {}}, "reg": {"lr": {}, "knn": {}, "svm": {}, "mlp": {}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "tree": {}, "sgd": {}, "hgboost": {}, "rgcv": {}, "cvlasso": {}, "huber": {}}}} -------------------------------------------------------------------------------- /optimalflow/webapp/settings_script.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | from optimalflow.utilis_func import pipeline_splitting_rule, update_parameters,reset_parameters 4 | 5 | import json 6 | import os 7 | 8 | json_path_s = os.path.join(os.path.dirname("./"), 'settings.json') 9 | with open(json_path_s, encoding='utf-8') as data_file: 10 | para_data = json.load(data_file) 11 | data_file.close() 12 | 13 | reset_flag = para_data['confirm_reset'] 14 | 15 | custom_space = { 16 | "cls_mlp":para_data['space_set']['cls']['mlp'], 17 | "cls_lr":para_data['space_set']['cls']['lgr'], 18 | "cls_svm":para_data['space_set']['cls']['svm'], 19 | "cls_ada":para_data['space_set']['cls']['ada'], 20 | "cls_xgb":para_data['space_set']['cls']['xgb'], 21 | "cls_rgcv":para_data['space_set']['cls']['rgcv'], 22 | "cls_rf":para_data['space_set']['cls']['rf'], 23 | "cls_gb":para_data['space_set']['cls']['gb'], 24 | "cls_lsvc":para_data['space_set']['cls']['lsvc'], 25 | "cls_hgboost":para_data['space_set']['cls']['hgboost'], 26 | "cls_sgd":para_data['space_set']['cls']['sgd'], 27 | "reg_lr":para_data['space_set']['reg']['lr'], 28 | "reg_svm":para_data['space_set']['reg']['svm'], 29 | "reg_mlp":para_data['space_set']['reg']['mlp'], 30 | "reg_ada":para_data['space_set']['reg']['ada'], 31 | "reg_rf":para_data['space_set']['reg']['rf'], 32 | "reg_gb":para_data['space_set']['reg']['gb'], 33 | "reg_xgb":para_data['space_set']['reg']['xgb'], 34 | "reg_tree":para_data['space_set']['reg']['tree'], 35 | "reg_hgboost":para_data['space_set']['reg']['hgboost'], 36 | "reg_rgcv":para_data['space_set']['reg']['rgcv'], 37 | "reg_cvlasso":para_data['space_set']['reg']['cvlasso'], 38 | "reg_huber":para_data['space_set']['reg']['huber'], 39 | "reg_sgd":para_data['space_set']['reg']['sgd'], 40 | "reg_knn":para_data['space_set']['reg']['knn'] 41 | } 42 | 43 | 44 | try: 45 | if(reset_flag == "reset_default"): 46 | reset_parameters() 47 | if(reset_flag == "reset_settings"): 48 | json_s = os.path.join(os.path.dirname("./"), 'reset_settings.json') 49 | with open(json_s,'r') as d_file: 50 | para = json.load(d_file) 51 | json_s = os.path.join(os.path.dirname("./"), 'settings.json') 52 | w_file = open(json_s, "w",encoding='utf-8') 53 | w_file. truncate(0) 54 | json.dump(para, w_file) 55 | w_file.close() 56 | if(reset_flag == "no_confirm"): 57 | reset_parameters() 58 | for i in custom_space.keys(): 59 | if custom_space[i]!={}: 60 | model_type, algo_name=i.split('_') 61 | update_parameters(mode = model_type,estimator_name=algo_name,**custom_space[i]) 62 | except: 63 | print("Failed to Set Up the Searching Space, will Use the Default Settings!") -------------------------------------------------------------------------------- /optimalflow/webapp/static/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.5.2 (https://getbootstrap.com/) 3 | * Copyright 2011-2020 The Bootstrap Authors 4 | * Copyright 2011-2020 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /optimalflow/webapp/static/css/heroic-features.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Heroic Features (https://startbootstrap.com/templates/heroic-features) 3 | * Copyright 2013-2020 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-heroic-features/blob/master/LICENSE) 5 | */ 6 | body { 7 | padding-top: 56px; 8 | } 9 | -------------------------------------------------------------------------------- /optimalflow/webapp/static/img/OptimalFlow_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/optimalflow/webapp/static/img/OptimalFlow_Logo.png -------------------------------------------------------------------------------- /optimalflow/webapp/static/img/OptimalFlow_Workflow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/optimalflow/webapp/static/img/OptimalFlow_Workflow.PNG -------------------------------------------------------------------------------- /optimalflow/webapp/static/img/Profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/optimalflow/webapp/static/img/Profile.jpg -------------------------------------------------------------------------------- /optimalflow/webapp/static/img/no-cls-output.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block body %} 6 |
7 |

Currently only support Pipeline Cluster Retrieval Diagram for Classification Problem...

8 | 9 |

You can connect with me on my LinkedIn or GitHub.

10 |
11 | 12 |
13 |
14 |

Copyright © Tony Dong 2020

15 |
16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /optimalflow/webapp/static/js/dependent-selects.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * dependent-selects 4 | * 5 | * Show filtered options on one select field depending on another 6 | * See in action https://codepen.io/furalyon/pen/NzrXZL 7 | * 8 | * By Ramkishore Manorahan - @furalyon 9 | * 10 | * 11 | * To use: 12 | * 1. Include this script 13 | * 2. Use the markup format as shown in the example.html 14 | * 15 | * usage eg: 16 | 17 | Parent 1: 22 | 23 | Child 1: 31 | 32 | * 33 | * Note: A page can have multiple sets of this 34 | * 35 | */ 36 | 37 | 38 | var handle_dependent_selects = function($parent) { 39 | var $child = document.getElementById($parent.getAttribute('data-child-id')), 40 | $selected = $parent.options[$parent.selectedIndex], 41 | parent_val = $selected.value; 42 | 43 | for (var i=0; i<$child.options.length; i++) { 44 | var $option = $child.options[i]; 45 | if($option.value != '') { 46 | $option.setAttribute('hidden',true); 47 | } 48 | }; 49 | 50 | if(parent_val) { 51 | var child_options = $selected.getAttribute('data-child-options'), 52 | child_options_array = child_options.split('|#'); 53 | 54 | for (i=0; i<$child.options.length; i++) { 55 | var $option = $child.options[i]; 56 | if ($option.value == "") { 57 | $option.innerText = "--------"; 58 | continue; 59 | } 60 | if(child_options_array.indexOf($option.value) != -1) { 61 | $option.removeAttribute('hidden'); 62 | } 63 | }; 64 | 65 | } else { 66 | var show_text = $child.getAttribute('data-text-if-parent-empty'); 67 | if(!show_text) { 68 | show_text = 'Select ' + $parent.name; 69 | } 70 | for (i=0; i<$child.options.length; i++) { 71 | var $option = $child.options[$child.selectedIndex]; 72 | if ($option.value == "") { 73 | $option.innerText = '- ' + show_text + ' -'; 74 | break; 75 | } 76 | }; 77 | } 78 | } 79 | 80 | document.addEventListener('DOMContentLoaded', function() { 81 | var $parents = document.getElementsByClassName('dependent-selects__parent'); 82 | for (var i=0; i<$parents.length; i++) { 83 | handle_dependent_selects($parents[i]); 84 | $parents[i].addEventListener('change', function() { 85 | handle_dependent_selects(this) 86 | }) 87 | } 88 | }, false); -------------------------------------------------------------------------------- /optimalflow/webapp/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow About Author{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

About Me

8 |

9 |

I am a healthcare & pharmaceutical data scientist and big data Analytics & AI enthusiast, living in Boston area.

10 |

In my spare time, I developed OptimalFlow library to help data scientists building optimal models in an easy way, and automate Machine Learning workflow with simple codes.

11 |

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.

12 |

You can connect with me on my LinkedIn or GitHub.

13 |
14 | 15 |
16 |
17 |

Copyright © Tony Dong 2020

18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /optimalflow/webapp/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %} {% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 48 | 49 | 50 | {% block body %} 51 | 52 | 53 | {% endblock %} 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /optimalflow/webapp/templates/docs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Documentation{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Documentation

9 |

Find Official OptimalFlow Manual Docs Here:

10 | 11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 |

Copyright © Tony Dong 2020

19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /optimalflow/webapp/templates/logs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Logs Viewer{% endblock %} 4 | 5 | {% block body %} 6 | 7 |
8 |

9 |

Logs Viewer

10 |

Quickly Check the Logs of OptimalFlow, which is Supported by autoFlow Module.

11 | 12 |
13 | 14 | 20 |
21 | 22 |

23 | 24 |

25 |
26 | 27 |
28 |
29 |

30 | 31 |

32 |
33 | 34 |
35 | {% if log_flag %} 36 | 37 | {% else %} 38 | 39 | {% endif %} 40 |
41 |
42 | 43 |
44 | 45 |

46 | 47 |

48 |
49 | 50 |
51 |
52 |

Copyright © Tony Dong 2020

53 |
54 | 55 |
56 | 57 | 58 | 59 | 60 | 61 | {% endblock %} 62 | -------------------------------------------------------------------------------- /optimalflow/webapp/templates/nologfile.html: -------------------------------------------------------------------------------- 1 |
2 |

Select the Log File Above, and Click the Button to Review.

3 |

NOTE: The Logs Files Will Only be Available When You've Done the PCTE Workflow Step.

4 |
-------------------------------------------------------------------------------- /optimalflow/webapp/templates/viz.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Visualization{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Visualization

9 |

Quickly Generate PCTE Model Evaluation Report or Retrieval Diagram, which are Supported by autoViz Module.

10 | 11 |
12 | 13 |
14 |

You can find more use demos from Documentation or from OptimalFlow's GitHub.

15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 |

Copyright © Tony Dong 2020

23 |
24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /optimalflow/webapp/webapp.json: -------------------------------------------------------------------------------- 1 | {"autoFS": {"feature_num": "8", "model_type_fs": "cls", "algo_fs": ["kbest_f", "rfe_lr"]}, "autoPP": {"scaler": ["None", "standard"], "encode_band": "4", "low_encode": ["onehot", "label"], "high_encode": ["frequency", "mean"], "winsorizer": ["0.05", "0.1"], "sparsity": "0.46", "cols": "1000", "model_type_pp": "cls"}, "autoCV": {"model_type_cv": "cls", "method_cv": "fastClassifier", "algo_cv": ["lgr", "mlp"]}, "label_col": "diagnosis", "filename": "breast_cancer.csv"} -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name="optimalflow", 8 | version="0.1.11", 9 | author="Tony Dong", 10 | author_email="tonyleidong@gmail.com", 11 | description="OptimalFlow is an Omni-ensemble Automated Machine Learning toolkit to help data scientists building optimal models in easy way, and automate Machine Learning workflow with simple code.", 12 | long_description=long_description, 13 | long_description_content_type="text/markdown", 14 | url="https://github.com/tonyleidong/OptimalFlow", 15 | keywords = ['automated machine learning', 'features selection', 'model selection','AutoML','omni-ensemble machine learning','Machine Learning Web App'], 16 | packages=setuptools.find_packages(), 17 | include_package_data = True, 18 | install_requires=[ 19 | 'pandas', 20 | 'scikit-learn', 21 | 'statsmodels', 22 | 'scipy', 23 | 'joblib', 24 | 'category_encoders', 25 | 'plotly', 26 | 'flask', 27 | 'wtforms', 28 | 'werkzeug', 29 | 'matplotlib', 30 | 'pandas', 31 | 'xgboost', 32 | 'pywin32' 33 | ], 34 | classifiers=[ 35 | "Programming Language :: Python :: 3.8", 36 | "License :: OSI Approved :: MIT License", 37 | "Operating System :: OS Independent", 38 | ], 39 | python_requires='>=3.7', 40 | 41 | ) 42 | 43 | -------------------------------------------------------------------------------- /tests/Demo_autoFS.py: -------------------------------------------------------------------------------- 1 | # Demo - Classification 2 | import pandas as pd 3 | from optimalflow.autoFS import dynaFS_clf 4 | 5 | tr_features = pd.read_csv('./data/classification/train_features.csv') 6 | tr_labels = pd.read_csv('./data/classification/train_labels.csv') 7 | 8 | clf_fs_demo = dynaFS_clf( fs_num =5,random_state=13,cv = 5) 9 | 10 | clf_fs_demo.fit_fs_clf(tr_features,tr_labels) 11 | 12 | 13 | # # Demo - Regression 14 | # import pandas as pd 15 | # from optimalflow.autoFS import dynaFS_reg 16 | 17 | # tr_features = pd.read_csv('./data/regression/train_features.csv') 18 | # tr_labels = pd.read_csv('./data/regression/train_labels.csv') 19 | 20 | # reg_fs_demo = dynaFS_reg( fs_num = 5,random_state = 13,cv = 5,input_from_file = True) 21 | 22 | # reg_fs_demo.fit_fs_reg(tr_features,tr_labels) 23 | 24 | 25 | # Selectors Demo - classification 26 | 27 | # import pandas as pd 28 | 29 | # tr_features = pd.read_csv('../data/classification/train_features.csv') 30 | # tr_labels = pd.read_csv('../data/classification/train_labels.csv') 31 | # val_features = pd.read_csv('../data/classification/val_features.csv') 32 | # val_labels = pd.read_csv('../data/classification/val_labels.csv') 33 | # te_features = pd.read_csv('../data/classification/test_features.csv') 34 | # te_labels = pd.read_csv('../data/classification/test_labels.csv') 35 | 36 | # tr_labels = tr_labels.values.ravel() 37 | # clf_demo = clf_fs(fs_num = 3) 38 | # clf_demo = clf_demo.rfecv_rf() 39 | # result = clf_demo.fit(tr_features,tr_labels) 40 | # print(result.get_support()) 41 | 42 | 43 | ''' 44 | # Selectors Demo - regression 45 | 46 | # import pandas as pd 47 | 48 | # tr_features = pd.read_csv('../data/regression/train_features.csv') 49 | # tr_labels = pd.read_csv('../data/regression/train_labels.csv') 50 | # # val_features = pd.read_csv('../data/val_features.csv') 51 | # # val_labels = pd.read_csv('../data/val_labels.csv') 52 | # # te_features = pd.read_csv('../data/test_features.csv') 53 | # # te_labels = pd.read_csv('../data/test_labels.csv') 54 | 55 | # tr_labels = tr_labels.values.ravel() 56 | # reg_demo = reg_fs(fs_num = 3) 57 | # reg_demo = reg_demo.rfecv_rf() 58 | # result = reg_demo.fit(tr_features,tr_labels) 59 | # print(result.get_support()) 60 | 61 | 62 | ''' -------------------------------------------------------------------------------- /tests/__pycache__/autoViz.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/__pycache__/autoViz.cpython-38.pyc -------------------------------------------------------------------------------- /tests/autoFS_demo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "language_info": { 4 | "codemirror_mode": { 5 | "name": "ipython", 6 | "version": 3 7 | }, 8 | "file_extension": ".py", 9 | "mimetype": "text/x-python", 10 | "name": "python", 11 | "nbconvert_exporter": "python", 12 | "pygments_lexer": "ipython3", 13 | "version": 3 14 | }, 15 | "orig_nbformat": 2 16 | }, 17 | "nbformat": 4, 18 | "nbformat_minor": 2, 19 | "cells": [ 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "This is a simple notebook demo to illustrate typically how OptimalFlow's autoFS module work" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": null, 30 | "metadata": {}, 31 | "outputs": [], 32 | "source": [ 33 | "# Demo - Classification\n", 34 | "\n", 35 | "import pandas as pd\n", 36 | "from optimalflow.autoFS import dynaFS_clf\n", 37 | "\n", 38 | "# Tatanic Cleaned dataset\n", 39 | "\n", 40 | "tr_features = pd.read_csv('./data/classification/train_features.csv')\n", 41 | "tr_labels = pd.read_csv('./data/classification/train_labels.csv')\n", 42 | "\n", 43 | "# Set input_form_file = False, when label values are array. Select 'True' from Pandas dataframe.\n", 44 | "\n", 45 | "clf_fs_demo = dynaFS_clf( fs_num =5,random_state=13,cv = 5,input_from_file = True)\n", 46 | "\n", 47 | "# You can find details of each selector's choice in autoFS_logxxxxx.log file in the ./test folder\n", 48 | "\n", 49 | "clf_fs_demo.fit(tr_features,tr_labels)" 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "execution_count": null, 55 | "metadata": {}, 56 | "outputs": [], 57 | "source": [ 58 | "# Demo - Regression\n", 59 | "\n", 60 | "import pandas as pd\n", 61 | "from optimalflow.autoFS import dynaFS_reg\n", 62 | "\n", 63 | "# Boston Housing Cleaned dataset\n", 64 | "\n", 65 | "tr_features = pd.read_csv('./data/regression/train_features.csv')\n", 66 | "tr_labels = pd.read_csv('./data/regression/train_labels.csv')\n", 67 | "\n", 68 | "# Set input_form_file = False, when label values are array. Select 'True' from Pandas dataframe.\n", 69 | "\n", 70 | "reg_fs_demo = dynaFS_reg( fs_num = 5,random_state = 13,cv = 5,input_from_file = True)\n", 71 | "\n", 72 | "# You can find details of each selector's choice in autoFS_logxxxxx.log file in the ./test folder\n", 73 | "\n", 74 | "reg_fs_demo.fit(tr_features,tr_labels)" 75 | ] 76 | } 77 | ] 78 | } -------------------------------------------------------------------------------- /tests/autoFlow.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | class autoFlow: 4 | def __init__(self,func = None): 5 | self.type = func 6 | def readlog(self,module_name = None): 7 | if module_name == "autoCV": 8 | file = open("./logs/autoCV_log_2020.08.07.23.23.41.log") 9 | lines = file.read().splitlines() 10 | file.close() 11 | -------------------------------------------------------------------------------- /tests/data/boston_target.csv: -------------------------------------------------------------------------------- 1 | Target 2 | 24.0 3 | 21.6 4 | 34.7 5 | 33.4 6 | 36.2 7 | 28.7 8 | 22.9 9 | 27.1 10 | 16.5 11 | 18.9 12 | 15.0 13 | 18.9 14 | 21.7 15 | 20.4 16 | 18.2 17 | 19.9 18 | 23.1 19 | 17.5 20 | 20.2 21 | 18.2 22 | 13.6 23 | 19.6 24 | 15.2 25 | 14.5 26 | 15.6 27 | 13.9 28 | 16.6 29 | 14.8 30 | 18.4 31 | 21.0 32 | 12.7 33 | 14.5 34 | 13.2 35 | 13.1 36 | 13.5 37 | 18.9 38 | 20.0 39 | 21.0 40 | 24.7 41 | 30.8 42 | 34.9 43 | 26.6 44 | 25.3 45 | 24.7 46 | 21.2 47 | 19.3 48 | 20.0 49 | 16.6 50 | 14.4 51 | 19.4 52 | 19.7 53 | 20.5 54 | 25.0 55 | 23.4 56 | 18.9 57 | 35.4 58 | 24.7 59 | 31.6 60 | 23.3 61 | 19.6 62 | 18.7 63 | 16.0 64 | 22.2 65 | 25.0 66 | 33.0 67 | 23.5 68 | 19.4 69 | 22.0 70 | 17.4 71 | 20.9 72 | 24.2 73 | 21.7 74 | 22.8 75 | 23.4 76 | 24.1 77 | 21.4 78 | 20.0 79 | 20.8 80 | 21.2 81 | 20.3 82 | 28.0 83 | 23.9 84 | 24.8 85 | 22.9 86 | 23.9 87 | 26.6 88 | 22.5 89 | 22.2 90 | 23.6 91 | 28.7 92 | 22.6 93 | 22.0 94 | 22.9 95 | 25.0 96 | 20.6 97 | 28.4 98 | 21.4 99 | 38.7 100 | 43.8 101 | 33.2 102 | 27.5 103 | 26.5 104 | 18.6 105 | 19.3 106 | 20.1 107 | 19.5 108 | 19.5 109 | 20.4 110 | 19.8 111 | 19.4 112 | 21.7 113 | 22.8 114 | 18.8 115 | 18.7 116 | 18.5 117 | 18.3 118 | 21.2 119 | 19.2 120 | 20.4 121 | 19.3 122 | 22.0 123 | 20.3 124 | 20.5 125 | 17.3 126 | 18.8 127 | 21.4 128 | 15.7 129 | 16.2 130 | 18.0 131 | 14.3 132 | 19.2 133 | 19.6 134 | 23.0 135 | 18.4 136 | 15.6 137 | 18.1 138 | 17.4 139 | 17.1 140 | 13.3 141 | 17.8 142 | 14.0 143 | 14.4 144 | 13.4 145 | 15.6 146 | 11.8 147 | 13.8 148 | 15.6 149 | 14.6 150 | 17.8 151 | 15.4 152 | 21.5 153 | 19.6 154 | 15.3 155 | 19.4 156 | 17.0 157 | 15.6 158 | 13.1 159 | 41.3 160 | 24.3 161 | 23.3 162 | 27.0 163 | 50.0 164 | 50.0 165 | 50.0 166 | 22.7 167 | 25.0 168 | 50.0 169 | 23.8 170 | 23.8 171 | 22.3 172 | 17.4 173 | 19.1 174 | 23.1 175 | 23.6 176 | 22.6 177 | 29.4 178 | 23.2 179 | 24.6 180 | 29.9 181 | 37.2 182 | 39.8 183 | 36.2 184 | 37.9 185 | 32.5 186 | 26.4 187 | 29.6 188 | 50.0 189 | 32.0 190 | 29.8 191 | 34.9 192 | 37.0 193 | 30.5 194 | 36.4 195 | 31.1 196 | 29.1 197 | 50.0 198 | 33.3 199 | 30.3 200 | 34.6 201 | 34.9 202 | 32.9 203 | 24.1 204 | 42.3 205 | 48.5 206 | 50.0 207 | 22.6 208 | 24.4 209 | 22.5 210 | 24.4 211 | 20.0 212 | 21.7 213 | 19.3 214 | 22.4 215 | 28.1 216 | 23.7 217 | 25.0 218 | 23.3 219 | 28.7 220 | 21.5 221 | 23.0 222 | 26.7 223 | 21.7 224 | 27.5 225 | 30.1 226 | 44.8 227 | 50.0 228 | 37.6 229 | 31.6 230 | 46.7 231 | 31.5 232 | 24.3 233 | 31.7 234 | 41.7 235 | 48.3 236 | 29.0 237 | 24.0 238 | 25.1 239 | 31.5 240 | 23.7 241 | 23.3 242 | 22.0 243 | 20.1 244 | 22.2 245 | 23.7 246 | 17.6 247 | 18.5 248 | 24.3 249 | 20.5 250 | 24.5 251 | 26.2 252 | 24.4 253 | 24.8 254 | 29.6 255 | 42.8 256 | 21.9 257 | 20.9 258 | 44.0 259 | 50.0 260 | 36.0 261 | 30.1 262 | 33.8 263 | 43.1 264 | 48.8 265 | 31.0 266 | 36.5 267 | 22.8 268 | 30.7 269 | 50.0 270 | 43.5 271 | 20.7 272 | 21.1 273 | 25.2 274 | 24.4 275 | 35.2 276 | 32.4 277 | 32.0 278 | 33.2 279 | 33.1 280 | 29.1 281 | 35.1 282 | 45.4 283 | 35.4 284 | 46.0 285 | 50.0 286 | 32.2 287 | 22.0 288 | 20.1 289 | 23.2 290 | 22.3 291 | 24.8 292 | 28.5 293 | 37.3 294 | 27.9 295 | 23.9 296 | 21.7 297 | 28.6 298 | 27.1 299 | 20.3 300 | 22.5 301 | 29.0 302 | 24.8 303 | 22.0 304 | 26.4 305 | 33.1 306 | 36.1 307 | 28.4 308 | 33.4 309 | 28.2 310 | 22.8 311 | 20.3 312 | 16.1 313 | 22.1 314 | 19.4 315 | 21.6 316 | 23.8 317 | 16.2 318 | 17.8 319 | 19.8 320 | 23.1 321 | 21.0 322 | 23.8 323 | 23.1 324 | 20.4 325 | 18.5 326 | 25.0 327 | 24.6 328 | 23.0 329 | 22.2 330 | 19.3 331 | 22.6 332 | 19.8 333 | 17.1 334 | 19.4 335 | 22.2 336 | 20.7 337 | 21.1 338 | 19.5 339 | 18.5 340 | 20.6 341 | 19.0 342 | 18.7 343 | 32.7 344 | 16.5 345 | 23.9 346 | 31.2 347 | 17.5 348 | 17.2 349 | 23.1 350 | 24.5 351 | 26.6 352 | 22.9 353 | 24.1 354 | 18.6 355 | 30.1 356 | 18.2 357 | 20.6 358 | 17.8 359 | 21.7 360 | 22.7 361 | 22.6 362 | 25.0 363 | 19.9 364 | 20.8 365 | 16.8 366 | 21.9 367 | 27.5 368 | 21.9 369 | 23.1 370 | 50.0 371 | 50.0 372 | 50.0 373 | 50.0 374 | 50.0 375 | 13.8 376 | 13.8 377 | 15.0 378 | 13.9 379 | 13.3 380 | 13.1 381 | 10.2 382 | 10.4 383 | 10.9 384 | 11.3 385 | 12.3 386 | 8.8 387 | 7.2 388 | 10.5 389 | 7.4 390 | 10.2 391 | 11.5 392 | 15.1 393 | 23.2 394 | 9.7 395 | 13.8 396 | 12.7 397 | 13.1 398 | 12.5 399 | 8.5 400 | 5.0 401 | 6.3 402 | 5.6 403 | 7.2 404 | 12.1 405 | 8.3 406 | 8.5 407 | 5.0 408 | 11.9 409 | 27.9 410 | 17.2 411 | 27.5 412 | 15.0 413 | 17.2 414 | 17.9 415 | 16.3 416 | 7.0 417 | 7.2 418 | 7.5 419 | 10.4 420 | 8.8 421 | 8.4 422 | 16.7 423 | 14.2 424 | 20.8 425 | 13.4 426 | 11.7 427 | 8.3 428 | 10.2 429 | 10.9 430 | 11.0 431 | 9.5 432 | 14.5 433 | 14.1 434 | 16.1 435 | 14.3 436 | 11.7 437 | 13.4 438 | 9.6 439 | 8.7 440 | 8.4 441 | 12.8 442 | 10.5 443 | 17.1 444 | 18.4 445 | 15.4 446 | 10.8 447 | 11.8 448 | 14.9 449 | 12.6 450 | 14.1 451 | 13.0 452 | 13.4 453 | 15.2 454 | 16.1 455 | 17.8 456 | 14.9 457 | 14.1 458 | 12.7 459 | 13.5 460 | 14.9 461 | 20.0 462 | 16.4 463 | 17.7 464 | 19.5 465 | 20.2 466 | 21.4 467 | 19.9 468 | 19.0 469 | 19.1 470 | 19.1 471 | 20.1 472 | 19.9 473 | 19.6 474 | 23.2 475 | 29.8 476 | 13.8 477 | 13.3 478 | 16.7 479 | 12.0 480 | 14.6 481 | 21.4 482 | 23.0 483 | 23.7 484 | 25.0 485 | 21.8 486 | 20.6 487 | 21.2 488 | 19.1 489 | 20.6 490 | 15.2 491 | 7.0 492 | 8.1 493 | 13.6 494 | 20.1 495 | 21.8 496 | 24.5 497 | 23.1 498 | 19.7 499 | 18.3 500 | 21.2 501 | 17.5 502 | 16.8 503 | 22.4 504 | 20.6 505 | 23.9 506 | 22.0 507 | 11.9 508 | -------------------------------------------------------------------------------- /tests/data/classification/test_features.csv: -------------------------------------------------------------------------------- 1 | Pclass,Sex,Age,Fare,Family_cnt,Cabin_ind 2 | 3,0,18.0,20.2125,2,0 3 | 3,0,29.69911764705882,8.05,0,0 4 | 3,0,40.5,7.75,0,0 5 | 3,1,31.0,20.525,2,0 6 | 2,0,32.0,10.5,0,0 7 | 1,0,28.0,47.1,0,0 8 | 1,1,16.0,39.4,1,1 9 | 1,1,50.0,247.5208,1,1 10 | 3,0,28.0,9.5,0,0 11 | 3,0,25.0,7.25,0,0 12 | 1,1,40.0,134.5,2,1 13 | 3,0,33.0,8.6625,0,0 14 | 3,0,29.69911764705882,14.4583,0,0 15 | 2,1,31.0,26.25,2,0 16 | 3,1,48.0,34.375,4,0 17 | 1,1,49.0,25.9292,0,1 18 | 3,0,21.0,7.925,0,0 19 | 3,1,1.0,15.7417,2,0 20 | 3,1,18.0,17.8,1,0 21 | 2,0,16.0,10.5,0,0 22 | 3,0,21.0,8.4333,0,0 23 | 3,0,29.69911764705882,7.8958,0,0 24 | 3,0,19.0,0.0,0,0 25 | 3,1,29.69911764705882,7.55,0,0 26 | 3,0,26.0,7.8542,1,0 27 | 2,1,25.0,26.0,1,0 28 | 2,0,66.0,10.5,0,0 29 | 1,0,50.0,55.9,1,1 30 | 3,0,10.0,27.9,5,0 31 | 1,1,39.0,83.1583,2,1 32 | 1,0,65.0,26.55,0,1 33 | 1,1,19.0,26.2833,2,1 34 | 3,0,29.69911764705882,7.8292,0,0 35 | 1,1,29.69911764705882,146.5208,1,1 36 | 1,0,36.0,26.2875,0,1 37 | 3,0,29.69911764705882,7.8958,0,0 38 | 3,1,19.0,7.8542,1,0 39 | 3,0,17.0,8.6625,0,0 40 | 3,0,29.69911764705882,7.8958,0,0 41 | 3,0,9.0,20.525,2,0 42 | 3,0,15.0,7.2292,2,0 43 | 3,0,19.0,7.8958,0,0 44 | 2,0,24.0,10.5,0,0 45 | 3,0,30.0,9.5,0,0 46 | 3,1,29.69911764705882,7.7875,0,0 47 | 3,1,26.0,7.925,0,0 48 | 1,1,18.0,79.65,2,1 49 | 1,1,26.0,78.85,0,0 50 | 3,0,16.0,34.375,4,0 51 | 3,0,25.0,7.05,0,0 52 | 2,0,29.69911764705882,15.05,0,0 53 | 3,0,29.69911764705882,8.6625,0,0 54 | 3,0,29.69911764705882,23.45,3,0 55 | 2,1,38.0,13.0,0,0 56 | 1,1,54.0,59.4,1,0 57 | 1,0,45.0,26.55,0,1 58 | 2,1,6.0,33.0,1,0 59 | 1,0,71.0,34.6542,0,1 60 | 3,1,30.5,7.75,0,0 61 | 3,0,22.0,7.25,0,0 62 | 1,0,29.69911764705882,25.925,0,0 63 | 3,0,19.0,8.1583,0,0 64 | 3,0,50.0,8.05,0,0 65 | 1,1,22.0,49.5,2,1 66 | 1,0,26.0,30.0,0,1 67 | 1,0,56.0,30.6958,0,1 68 | 3,0,29.69911764705882,7.8958,0,0 69 | 2,0,34.0,13.0,0,0 70 | 1,0,50.0,133.65,2,0 71 | 3,0,29.69911764705882,7.7292,0,0 72 | 3,0,20.0,7.05,0,0 73 | 1,1,35.0,90.0,1,1 74 | 1,1,29.69911764705882,133.65,1,0 75 | 2,0,25.0,13.0,0,0 76 | 2,0,3.0,26.0,2,1 77 | 3,0,36.0,15.55,1,0 78 | 3,0,27.0,6.975,0,0 79 | 3,0,20.0,7.925,1,0 80 | 1,0,42.0,52.5542,1,1 81 | 2,0,21.0,73.5,0,0 82 | 2,0,29.69911764705882,0.0,0,0 83 | 3,0,16.0,18.0,2,0 84 | 3,0,26.0,14.4542,1,0 85 | 3,0,18.0,7.7958,0,0 86 | 3,1,24.0,16.7,2,1 87 | 2,0,29.69911764705882,13.8625,0,0 88 | 3,0,29.69911764705882,7.25,0,0 89 | 2,1,36.0,26.0,1,0 90 | 1,0,40.0,31.0,0,1 91 | 1,0,28.0,26.55,0,1 92 | 3,0,21.0,7.775,0,0 93 | 1,0,29.69911764705882,221.7792,0,1 94 | 3,0,22.0,8.05,0,0 95 | 1,1,29.69911764705882,52.0,1,1 96 | 3,0,49.0,0.0,0,0 97 | 1,0,0.92,151.55,3,1 98 | 3,1,29.69911764705882,7.8292,0,0 99 | 2,1,34.0,32.5,2,0 100 | 3,0,29.69911764705882,14.5,0,0 101 | 3,0,35.0,7.125,0,0 102 | 2,0,54.0,26.0,0,0 103 | 3,1,6.0,31.275,6,0 104 | 2,1,27.0,21.0,1,0 105 | 3,0,29.0,7.775,0,0 106 | 3,0,29.69911764705882,7.05,0,0 107 | 1,0,29.69911764705882,30.5,0,1 108 | 3,0,29.69911764705882,25.4667,4,0 109 | 3,1,63.0,9.5875,0,0 110 | 3,1,9.0,15.2458,2,0 111 | 3,1,47.0,14.5,1,0 112 | 1,0,65.0,61.9792,1,1 113 | 2,1,41.0,19.5,1,0 114 | 1,0,47.0,52.0,0,1 115 | 2,0,23.0,15.0458,0,0 116 | 3,1,41.0,20.2125,2,0 117 | 1,0,54.0,51.8625,0,1 118 | 2,0,27.0,13.0,0,0 119 | 3,0,30.0,7.25,0,0 120 | 3,0,30.5,8.05,0,0 121 | 1,1,38.0,80.0,0,1 122 | 2,1,22.0,29.0,2,0 123 | 3,1,22.0,7.75,0,0 124 | 1,0,28.0,35.5,0,1 125 | 3,1,29.69911764705882,24.15,1,0 126 | 3,1,38.0,31.3875,6,0 127 | 2,1,40.0,13.0,0,0 128 | 1,0,52.0,30.5,0,1 129 | 1,1,29.69911764705882,51.8625,1,1 130 | 3,0,22.0,7.8958,0,0 131 | 3,1,19.0,7.8792,0,0 132 | 3,0,20.5,7.25,0,0 133 | 3,0,20.0,8.05,0,0 134 | 3,1,29.69911764705882,7.75,0,0 135 | 3,1,22.0,10.5167,0,0 136 | 1,1,42.0,227.525,0,0 137 | 1,0,37.0,53.1,1,1 138 | 1,1,29.69911764705882,82.1708,1,0 139 | 3,0,38.0,7.05,0,0 140 | 2,1,29.0,10.5,0,1 141 | 3,0,29.69911764705882,7.225,0,0 142 | 2,1,7.0,26.25,2,0 143 | 2,1,17.0,10.5,0,0 144 | 3,0,32.0,7.925,0,0 145 | 2,0,57.0,12.35,0,0 146 | 3,0,29.0,9.5,0,0 147 | 1,0,61.0,32.3208,0,1 148 | 1,1,52.0,78.2667,1,1 149 | 3,1,18.0,9.8417,0,0 150 | 1,0,48.0,52.0,1,1 151 | 2,0,37.0,26.0,1,0 152 | 2,0,43.0,26.25,2,0 153 | 3,0,45.0,8.05,0,0 154 | 2,1,50.0,26.0,1,0 155 | 3,0,17.0,7.2292,2,0 156 | 3,0,20.0,9.225,0,0 157 | 3,1,29.69911764705882,7.75,0,0 158 | 3,1,39.0,29.125,5,0 159 | 1,1,63.0,77.9583,1,1 160 | 3,0,29.0,7.875,0,0 161 | 3,0,1.0,39.6875,5,0 162 | 2,1,21.0,10.5,0,0 163 | 1,0,35.0,26.55,0,0 164 | 2,0,30.0,13.0,0,0 165 | 3,1,11.0,31.275,6,0 166 | 1,1,31.0,113.275,1,1 167 | 1,0,49.0,89.1042,1,1 168 | 3,1,31.0,18.0,1,0 169 | 2,0,19.0,36.75,2,0 170 | 2,1,24.0,14.5,2,0 171 | 2,0,36.0,27.75,3,0 172 | 1,0,36.0,26.3875,0,1 173 | 3,0,22.0,7.2292,0,0 174 | 2,0,23.0,13.0,0,0 175 | 3,1,30.0,12.475,0,0 176 | 3,0,21.0,8.05,0,0 177 | 1,1,30.0,31.0,0,0 178 | 3,0,44.0,8.05,0,0 179 | 1,1,21.0,262.375,4,1 180 | 1,1,38.0,227.525,0,1 181 | -------------------------------------------------------------------------------- /tests/data/classification/test_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 0 3 | 0 4 | 0 5 | 1 6 | 0 7 | 0 8 | 1 9 | 1 10 | 0 11 | 0 12 | 1 13 | 0 14 | 0 15 | 1 16 | 0 17 | 1 18 | 0 19 | 1 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 1 28 | 0 29 | 0 30 | 0 31 | 1 32 | 0 33 | 1 34 | 0 35 | 1 36 | 1 37 | 0 38 | 1 39 | 0 40 | 0 41 | 1 42 | 0 43 | 0 44 | 0 45 | 1 46 | 1 47 | 1 48 | 1 49 | 1 50 | 0 51 | 0 52 | 0 53 | 0 54 | 0 55 | 0 56 | 1 57 | 0 58 | 1 59 | 0 60 | 0 61 | 0 62 | 0 63 | 0 64 | 0 65 | 1 66 | 1 67 | 0 68 | 0 69 | 0 70 | 1 71 | 0 72 | 0 73 | 1 74 | 1 75 | 0 76 | 1 77 | 0 78 | 1 79 | 1 80 | 1 81 | 0 82 | 0 83 | 0 84 | 0 85 | 0 86 | 1 87 | 1 88 | 0 89 | 1 90 | 1 91 | 1 92 | 0 93 | 0 94 | 0 95 | 1 96 | 0 97 | 1 98 | 1 99 | 1 100 | 0 101 | 0 102 | 0 103 | 0 104 | 0 105 | 0 106 | 0 107 | 1 108 | 0 109 | 1 110 | 0 111 | 0 112 | 0 113 | 1 114 | 0 115 | 0 116 | 0 117 | 0 118 | 0 119 | 0 120 | 0 121 | 1 122 | 1 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 0 131 | 1 132 | 0 133 | 0 134 | 1 135 | 0 136 | 1 137 | 0 138 | 1 139 | 0 140 | 1 141 | 0 142 | 1 143 | 1 144 | 0 145 | 0 146 | 1 147 | 0 148 | 1 149 | 1 150 | 1 151 | 0 152 | 0 153 | 1 154 | 1 155 | 0 156 | 0 157 | 1 158 | 0 159 | 1 160 | 0 161 | 0 162 | 1 163 | 1 164 | 0 165 | 0 166 | 1 167 | 1 168 | 0 169 | 0 170 | 1 171 | 0 172 | 1 173 | 0 174 | 0 175 | 1 176 | 0 177 | 1 178 | 0 179 | 1 180 | 1 181 | -------------------------------------------------------------------------------- /tests/data/classification/train_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 1 3 | 0 4 | 1 5 | 0 6 | 1 7 | 0 8 | 0 9 | 0 10 | 1 11 | 0 12 | 0 13 | 0 14 | 0 15 | 1 16 | 0 17 | 1 18 | 1 19 | 0 20 | 0 21 | 1 22 | 1 23 | 1 24 | 0 25 | 1 26 | 0 27 | 1 28 | 1 29 | 0 30 | 0 31 | 0 32 | 0 33 | 0 34 | 0 35 | 0 36 | 1 37 | 1 38 | 1 39 | 1 40 | 1 41 | 0 42 | 0 43 | 0 44 | 1 45 | 1 46 | 0 47 | 1 48 | 0 49 | 1 50 | 1 51 | 1 52 | 0 53 | 1 54 | 0 55 | 0 56 | 0 57 | 1 58 | 1 59 | 0 60 | 1 61 | 1 62 | 0 63 | 0 64 | 0 65 | 1 66 | 0 67 | 1 68 | 0 69 | 0 70 | 0 71 | 1 72 | 0 73 | 1 74 | 1 75 | 1 76 | 0 77 | 1 78 | 0 79 | 0 80 | 0 81 | 0 82 | 0 83 | 0 84 | 0 85 | 1 86 | 0 87 | 0 88 | 1 89 | 0 90 | 0 91 | 0 92 | 1 93 | 0 94 | 0 95 | 1 96 | 0 97 | 1 98 | 0 99 | 0 100 | 0 101 | 0 102 | 1 103 | 0 104 | 0 105 | 0 106 | 0 107 | 1 108 | 0 109 | 0 110 | 1 111 | 0 112 | 0 113 | 1 114 | 1 115 | 1 116 | 0 117 | 0 118 | 0 119 | 1 120 | 1 121 | 0 122 | 1 123 | 1 124 | 0 125 | 1 126 | 0 127 | 1 128 | 0 129 | 0 130 | 0 131 | 0 132 | 1 133 | 1 134 | 1 135 | 1 136 | 0 137 | 1 138 | 1 139 | 1 140 | 0 141 | 0 142 | 0 143 | 0 144 | 0 145 | 1 146 | 0 147 | 0 148 | 0 149 | 0 150 | 0 151 | 0 152 | 0 153 | 1 154 | 0 155 | 1 156 | 0 157 | 0 158 | 0 159 | 0 160 | 0 161 | 1 162 | 1 163 | 0 164 | 1 165 | 0 166 | 0 167 | 1 168 | 0 169 | 1 170 | 0 171 | 1 172 | 0 173 | 0 174 | 0 175 | 0 176 | 1 177 | 0 178 | 0 179 | 0 180 | 0 181 | 0 182 | 1 183 | 1 184 | 1 185 | 1 186 | 1 187 | 0 188 | 1 189 | 1 190 | 0 191 | 1 192 | 0 193 | 1 194 | 1 195 | 0 196 | 1 197 | 0 198 | 1 199 | 0 200 | 1 201 | 0 202 | 0 203 | 0 204 | 0 205 | 0 206 | 0 207 | 0 208 | 0 209 | 1 210 | 0 211 | 0 212 | 0 213 | 0 214 | 1 215 | 0 216 | 0 217 | 0 218 | 0 219 | 1 220 | 0 221 | 0 222 | 0 223 | 0 224 | 1 225 | 0 226 | 1 227 | 0 228 | 0 229 | 1 230 | 1 231 | 0 232 | 0 233 | 0 234 | 0 235 | 0 236 | 1 237 | 0 238 | 0 239 | 1 240 | 0 241 | 0 242 | 0 243 | 0 244 | 0 245 | 1 246 | 1 247 | 0 248 | 0 249 | 0 250 | 0 251 | 0 252 | 1 253 | 1 254 | 0 255 | 1 256 | 1 257 | 0 258 | 1 259 | 1 260 | 0 261 | 1 262 | 0 263 | 0 264 | 1 265 | 0 266 | 1 267 | 0 268 | 0 269 | 0 270 | 0 271 | 0 272 | 1 273 | 0 274 | 0 275 | 0 276 | 1 277 | 0 278 | 0 279 | 1 280 | 0 281 | 0 282 | 0 283 | 1 284 | 0 285 | 1 286 | 1 287 | 1 288 | 1 289 | 1 290 | 0 291 | 0 292 | 0 293 | 1 294 | 1 295 | 0 296 | 1 297 | 0 298 | 1 299 | 0 300 | 0 301 | 0 302 | 0 303 | 1 304 | 0 305 | 0 306 | 0 307 | 0 308 | 1 309 | 0 310 | 0 311 | 1 312 | 0 313 | 0 314 | 0 315 | 0 316 | 1 317 | 0 318 | 0 319 | 0 320 | 1 321 | 1 322 | 0 323 | 0 324 | 1 325 | 0 326 | 0 327 | 1 328 | 1 329 | 0 330 | 0 331 | 0 332 | 1 333 | 1 334 | 0 335 | 0 336 | 0 337 | 0 338 | 0 339 | 0 340 | 1 341 | 1 342 | 1 343 | 1 344 | 0 345 | 1 346 | 0 347 | 1 348 | 0 349 | 0 350 | 1 351 | 1 352 | 0 353 | 0 354 | 0 355 | 0 356 | 1 357 | 0 358 | 0 359 | 1 360 | 1 361 | 1 362 | 0 363 | 1 364 | 1 365 | 0 366 | 0 367 | 0 368 | 0 369 | 0 370 | 1 371 | 0 372 | 0 373 | 1 374 | 1 375 | 1 376 | 0 377 | 0 378 | 0 379 | 0 380 | 1 381 | 1 382 | 1 383 | 1 384 | 0 385 | 0 386 | 0 387 | 0 388 | 0 389 | 0 390 | 0 391 | 1 392 | 1 393 | 0 394 | 1 395 | 0 396 | 0 397 | 1 398 | 1 399 | 1 400 | 0 401 | 0 402 | 1 403 | 1 404 | 0 405 | 0 406 | 0 407 | 0 408 | 1 409 | 1 410 | 0 411 | 1 412 | 0 413 | 0 414 | 1 415 | 0 416 | 0 417 | 0 418 | 0 419 | 0 420 | 1 421 | 1 422 | 0 423 | 1 424 | 0 425 | 0 426 | 1 427 | 0 428 | 0 429 | 0 430 | 1 431 | 1 432 | 1 433 | 1 434 | 1 435 | 0 436 | 0 437 | 1 438 | 0 439 | 1 440 | 0 441 | 1 442 | 0 443 | 1 444 | 1 445 | 1 446 | 0 447 | 1 448 | 0 449 | 0 450 | 0 451 | 0 452 | 0 453 | 0 454 | 0 455 | 0 456 | 1 457 | 1 458 | 0 459 | 0 460 | 0 461 | 0 462 | 0 463 | 0 464 | 0 465 | 1 466 | 0 467 | 1 468 | 0 469 | 0 470 | 0 471 | 1 472 | 0 473 | 1 474 | 0 475 | 1 476 | 1 477 | 1 478 | 0 479 | 1 480 | 0 481 | 0 482 | 0 483 | 1 484 | 0 485 | 1 486 | 1 487 | 0 488 | 0 489 | 0 490 | 0 491 | 0 492 | 0 493 | 0 494 | 0 495 | 1 496 | 1 497 | 1 498 | 0 499 | 0 500 | 1 501 | 0 502 | 1 503 | 0 504 | 0 505 | 0 506 | 0 507 | 0 508 | 0 509 | 0 510 | 0 511 | 0 512 | 0 513 | 0 514 | 0 515 | 0 516 | 0 517 | 0 518 | 1 519 | 0 520 | 0 521 | 0 522 | 1 523 | 1 524 | 0 525 | 0 526 | 0 527 | 0 528 | 0 529 | 1 530 | 0 531 | 1 532 | 0 533 | 0 534 | 1 535 | 0 536 | -------------------------------------------------------------------------------- /tests/data/classification/val_features.csv: -------------------------------------------------------------------------------- 1 | Pclass,Sex,Age,Fare,Family_cnt,Cabin_ind 2 | 1,1,29.69911764705882,89.1042,1,1 3 | 1,0,45.5,28.5,0,1 4 | 3,0,29.69911764705882,7.75,0,0 5 | 2,1,24.0,26.0,1,0 6 | 2,0,36.0,12.875,0,1 7 | 3,0,29.69911764705882,7.75,0,0 8 | 3,0,29.69911764705882,8.1125,0,0 9 | 2,0,36.0,10.5,0,0 10 | 3,0,21.0,7.8,0,0 11 | 3,0,29.69911764705882,8.4583,0,0 12 | 2,0,52.0,13.5,0,0 13 | 3,0,29.69911764705882,7.225,0,0 14 | 3,0,29.69911764705882,8.05,0,0 15 | 3,0,34.5,6.4375,0,0 16 | 3,0,20.0,7.925,0,0 17 | 3,0,20.0,9.8458,0,0 18 | 1,1,17.0,57.0,1,1 19 | 1,0,29.69911764705882,50.0,0,1 20 | 3,0,32.0,8.05,0,1 21 | 2,0,23.0,11.5,3,0 22 | 3,0,29.0,8.05,0,0 23 | 3,1,29.69911764705882,7.8792,0,0 24 | 3,0,16.0,20.25,2,0 25 | 1,0,24.0,79.2,0,1 26 | 3,0,23.0,7.8542,0,0 27 | 3,0,4.0,11.1333,2,0 28 | 3,1,31.0,7.8542,0,0 29 | 3,0,29.69911764705882,7.7375,0,0 30 | 3,0,29.69911764705882,15.5,0,0 31 | 1,0,47.0,38.5,0,1 32 | 1,0,27.0,211.5,2,1 33 | 3,0,23.0,7.8958,0,0 34 | 3,1,5.0,12.475,0,0 35 | 1,0,24.0,247.5208,1,1 36 | 1,0,50.0,106.425,1,1 37 | 3,1,45.0,14.4542,1,0 38 | 3,1,21.0,34.375,4,0 39 | 2,1,57.0,10.5,0,1 40 | 3,0,17.0,8.6625,0,0 41 | 1,0,71.0,49.5042,0,0 42 | 2,0,29.0,27.7208,1,0 43 | 2,1,26.0,26.0,2,0 44 | 3,1,32.0,15.5,2,0 45 | 3,1,29.69911764705882,25.4667,4,0 46 | 3,0,27.0,14.4542,1,0 47 | 3,0,4.0,27.9,5,0 48 | 1,0,23.0,63.3583,1,1 49 | 2,0,28.0,13.0,0,0 50 | 3,0,29.69911764705882,8.7125,0,0 51 | 2,1,24.0,13.0,0,0 52 | 3,0,29.69911764705882,15.2458,2,0 53 | 3,1,29.69911764705882,7.2292,0,0 54 | 1,1,52.0,93.5,2,1 55 | 1,0,4.0,81.8583,2,1 56 | 3,0,28.0,7.8542,0,0 57 | 3,0,44.0,8.05,0,0 58 | 3,1,4.0,16.7,2,1 59 | 3,0,20.0,7.2292,0,0 60 | 2,0,0.83,29.0,2,0 61 | 3,0,29.0,7.0458,1,0 62 | 3,0,29.69911764705882,7.25,0,0 63 | 1,1,39.0,110.8833,2,1 64 | 3,0,29.0,9.4833,0,0 65 | 1,1,29.69911764705882,110.8833,0,0 66 | 1,0,40.0,27.7208,0,0 67 | 3,0,29.69911764705882,56.4958,0,0 68 | 2,1,44.0,26.0,1,0 69 | 3,0,29.69911764705882,8.05,0,0 70 | 2,0,25.0,41.5792,3,0 71 | 3,1,14.0,11.2417,1,0 72 | 3,0,29.69911764705882,15.2458,2,0 73 | 1,0,29.69911764705882,35.0,0,1 74 | 1,0,25.0,55.4417,1,1 75 | 2,1,50.0,10.5,0,0 76 | 1,0,64.0,26.0,0,0 77 | 3,0,22.0,7.5208,0,0 78 | 3,0,17.0,7.0542,1,0 79 | 2,0,8.0,36.75,2,0 80 | 3,0,29.69911764705882,7.725,0,0 81 | 2,1,18.0,13.0,2,0 82 | 2,1,36.0,13.0,0,1 83 | 3,0,2.0,21.075,4,0 84 | 2,1,13.0,19.5,1,0 85 | 3,0,23.0,9.225,0,0 86 | 1,0,29.69911764705882,30.6958,0,0 87 | 3,0,61.0,6.2375,0,0 88 | 2,1,45.0,13.5,0,0 89 | 2,0,31.0,13.0,0,0 90 | 3,0,26.0,8.6625,2,0 91 | 2,0,34.0,21.0,1,0 92 | 1,1,22.0,151.55,0,0 93 | 2,0,39.0,13.0,0,0 94 | 3,0,16.0,8.05,0,0 95 | 3,0,42.0,7.55,0,0 96 | 2,1,28.0,26.0,1,0 97 | 3,1,15.0,14.4542,1,0 98 | 3,1,29.69911764705882,14.4583,1,0 99 | 3,1,16.0,7.75,0,0 100 | 3,0,29.69911764705882,7.75,0,0 101 | 2,0,36.0,13.0,0,0 102 | 3,0,29.69911764705882,56.4958,0,0 103 | 2,0,21.0,73.5,2,0 104 | 3,1,29.69911764705882,7.75,0,0 105 | 3,0,19.0,7.65,0,1 106 | 2,1,25.0,30.0,2,0 107 | 2,0,39.0,13.0,0,0 108 | 2,0,24.0,13.0,0,0 109 | 1,1,62.0,80.0,0,1 110 | 1,0,36.0,120.0,3,1 111 | 1,1,33.0,90.0,1,1 112 | 3,1,23.0,7.925,0,0 113 | 2,0,36.5,26.0,2,1 114 | 3,0,26.0,7.8958,0,0 115 | 3,0,32.0,7.8542,0,0 116 | 3,0,29.69911764705882,7.8958,0,0 117 | 3,1,30.0,8.6625,0,0 118 | 1,0,29.69911764705882,26.55,0,0 119 | 3,0,29.69911764705882,7.75,0,0 120 | 1,0,51.0,61.3792,1,0 121 | 3,0,36.0,24.15,2,0 122 | 2,1,29.0,26.0,1,0 123 | 3,0,25.0,7.775,1,0 124 | 1,0,11.0,120.0,3,1 125 | 2,0,31.0,10.5,0,0 126 | 1,0,58.0,113.275,2,1 127 | 3,0,16.0,39.6875,5,0 128 | 3,1,29.69911764705882,22.3583,2,0 129 | 3,0,18.0,8.05,0,0 130 | 3,0,27.0,8.6625,0,0 131 | 3,1,9.0,31.275,6,0 132 | 3,0,40.0,27.9,5,0 133 | 1,0,29.69911764705882,0.0,0,0 134 | 2,1,42.0,26.0,1,0 135 | 3,0,30.0,7.225,0,0 136 | 1,0,38.0,0.0,0,0 137 | 1,0,38.0,153.4625,1,1 138 | 2,0,23.0,10.5,0,0 139 | 1,1,44.0,57.9792,1,1 140 | 1,0,49.0,56.9292,1,1 141 | 3,0,39.0,24.15,0,0 142 | 3,0,9.0,31.3875,6,0 143 | 3,1,8.0,21.075,4,0 144 | 3,1,20.0,8.6625,0,0 145 | 3,0,65.0,7.75,0,0 146 | 3,1,5.0,19.2583,3,0 147 | 3,0,17.0,7.125,0,0 148 | 2,1,42.0,13.0,0,0 149 | 3,1,43.0,46.9,7,0 150 | 3,0,29.69911764705882,7.8958,0,0 151 | 3,0,35.0,7.05,0,0 152 | 2,1,35.0,21.0,0,0 153 | 3,0,24.0,7.05,0,0 154 | 3,1,22.0,7.775,0,0 155 | 3,0,29.69911764705882,7.75,0,0 156 | 1,0,34.0,26.55,0,0 157 | 3,0,38.0,7.8958,0,0 158 | 3,0,23.5,7.2292,0,0 159 | 3,0,18.0,8.3,0,0 160 | 2,0,33.0,12.275,0,0 161 | 3,1,29.69911764705882,15.2458,2,0 162 | 1,1,51.0,77.9583,1,1 163 | 1,0,60.0,26.55,0,0 164 | 3,0,43.0,8.05,0,0 165 | 3,1,29.69911764705882,7.8792,0,0 166 | 3,0,24.0,7.4958,0,0 167 | 3,0,27.0,7.8958,0,0 168 | 1,1,30.0,56.9292,0,1 169 | 3,0,25.0,7.225,0,0 170 | 3,1,29.69911764705882,25.4667,4,0 171 | 1,1,32.0,76.2917,0,1 172 | 1,0,37.0,52.5542,2,1 173 | 3,0,24.0,7.8958,0,0 174 | 1,0,29.69911764705882,35.5,0,1 175 | 1,1,18.0,262.375,4,1 176 | 2,1,40.0,39.0,2,0 177 | 3,1,1.0,11.1333,2,0 178 | 1,0,60.0,79.2,2,1 179 | 1,1,19.0,91.0792,1,1 180 | -------------------------------------------------------------------------------- /tests/data/classification/val_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 1 3 | 0 4 | 0 5 | 1 6 | 0 7 | 0 8 | 1 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 0 18 | 1 19 | 0 20 | 1 21 | 0 22 | 0 23 | 1 24 | 0 25 | 0 26 | 0 27 | 1 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 0 34 | 1 35 | 0 36 | 0 37 | 0 38 | 0 39 | 0 40 | 0 41 | 0 42 | 0 43 | 0 44 | 0 45 | 0 46 | 0 47 | 0 48 | 1 49 | 0 50 | 0 51 | 0 52 | 1 53 | 1 54 | 1 55 | 1 56 | 0 57 | 0 58 | 1 59 | 1 60 | 1 61 | 0 62 | 0 63 | 1 64 | 0 65 | 1 66 | 0 67 | 1 68 | 0 69 | 0 70 | 0 71 | 1 72 | 1 73 | 0 74 | 1 75 | 1 76 | 0 77 | 0 78 | 0 79 | 1 80 | 0 81 | 1 82 | 1 83 | 0 84 | 1 85 | 0 86 | 0 87 | 0 88 | 1 89 | 1 90 | 0 91 | 0 92 | 1 93 | 0 94 | 1 95 | 0 96 | 1 97 | 1 98 | 0 99 | 1 100 | 0 101 | 0 102 | 1 103 | 0 104 | 0 105 | 0 106 | 1 107 | 0 108 | 0 109 | 1 110 | 1 111 | 1 112 | 0 113 | 0 114 | 0 115 | 1 116 | 0 117 | 0 118 | 1 119 | 0 120 | 0 121 | 0 122 | 1 123 | 0 124 | 1 125 | 0 126 | 0 127 | 0 128 | 1 129 | 1 130 | 1 131 | 0 132 | 0 133 | 0 134 | 1 135 | 0 136 | 0 137 | 0 138 | 0 139 | 1 140 | 1 141 | 0 142 | 0 143 | 0 144 | 0 145 | 0 146 | 1 147 | 0 148 | 1 149 | 0 150 | 0 151 | 0 152 | 1 153 | 0 154 | 1 155 | 0 156 | 1 157 | 0 158 | 0 159 | 0 160 | 0 161 | 0 162 | 1 163 | 0 164 | 0 165 | 1 166 | 0 167 | 0 168 | 1 169 | 0 170 | 0 171 | 1 172 | 1 173 | 0 174 | 1 175 | 1 176 | 1 177 | 1 178 | 1 179 | 1 180 | -------------------------------------------------------------------------------- /tests/data/regression/test_labels.csv: -------------------------------------------------------------------------------- 1 | Target 2 | 20.5 3 | 23.8 4 | 13.1 5 | 18.5 6 | 14.9 7 | 12.7 8 | 34.7 9 | 10.2 10 | 22.0 11 | 14.6 12 | 8.1 13 | 25.0 14 | 17.4 15 | 33.1 16 | 13.4 17 | 31.5 18 | 19.4 19 | 22.6 20 | 23.1 21 | 32.0 22 | 13.5 23 | 21.7 24 | 14.3 25 | 15.6 26 | 8.5 27 | 20.0 28 | 7.2 29 | 21.2 30 | 32.7 31 | 18.5 32 | 21.6 33 | 21.7 34 | 22.8 35 | 12.7 36 | 19.6 37 | 5.6 38 | 15.2 39 | 50.0 40 | 14.1 41 | 18.8 42 | 19.9 43 | 15.6 44 | 16.1 45 | 31.0 46 | 27.5 47 | 20.9 48 | 38.7 49 | 13.1 50 | 18.3 51 | 22.3 52 | 36.5 53 | 23.3 54 | 13.8 55 | 23.7 56 | 32.9 57 | 13.9 58 | 7.0 59 | 21.4 60 | 16.8 61 | 37.6 62 | 21.4 63 | 30.8 64 | 20.0 65 | 43.8 66 | 17.4 67 | 14.8 68 | 43.5 69 | 21.2 70 | 18.1 71 | 24.8 72 | 12.7 73 | 19.1 74 | 18.8 75 | 23.5 76 | 20.8 77 | 21.7 78 | 22.0 79 | 16.7 80 | 19.3 81 | 11.7 82 | 48.3 83 | 18.9 84 | 7.4 85 | 23.1 86 | 16.1 87 | 33.3 88 | 20.1 89 | 8.8 90 | 16.0 91 | 11.7 92 | 17.0 93 | 20.0 94 | 36.1 95 | 11.9 96 | 20.4 97 | 24.1 98 | 22.9 99 | 21.1 100 | 20.4 101 | 27.5 102 | 8.5 103 | 13.4 104 | -------------------------------------------------------------------------------- /tests/data/regression/train_labels.csv: -------------------------------------------------------------------------------- 1 | Target 2 | 18.9 3 | 22.6 4 | 29.6 5 | 20.6 6 | 24.3 7 | 16.2 8 | 19.6 9 | 35.1 10 | 17.5 11 | 12.5 12 | 22.2 13 | 22.9 14 | 34.9 15 | 28.0 16 | 17.4 17 | 7.2 18 | 23.4 19 | 21.2 20 | 27.9 21 | 20.2 22 | 22.7 23 | 26.2 24 | 50.0 25 | 32.0 26 | 20.7 27 | 15.0 28 | 17.2 29 | 23.1 30 | 10.9 31 | 21.5 32 | 17.2 33 | 35.2 34 | 10.9 35 | 23.8 36 | 17.8 37 | 25.0 38 | 10.5 39 | 26.6 40 | 11.9 41 | 20.3 42 | 21.9 43 | 14.5 44 | 10.8 45 | 23.1 46 | 25.0 47 | 14.9 48 | 6.3 49 | 24.2 50 | 13.2 51 | 24.7 52 | 19.8 53 | 18.5 54 | 23.9 55 | 29.6 56 | 18.7 57 | 29.1 58 | 10.5 59 | 32.2 60 | 50.0 61 | 35.4 62 | 7.5 63 | 16.3 64 | 25.0 65 | 25.3 66 | 19.1 67 | 28.7 68 | 14.3 69 | 23.1 70 | 19.8 71 | 17.5 72 | 20.0 73 | 8.3 74 | 23.2 75 | 26.7 76 | 17.8 77 | 19.3 78 | 18.0 79 | 10.2 80 | 22.2 81 | 28.4 82 | 21.2 83 | 11.0 84 | 34.9 85 | 36.2 86 | 19.7 87 | 22.5 88 | 18.7 89 | 29.0 90 | 13.5 91 | 22.4 92 | 18.4 93 | 36.2 94 | 28.6 95 | 14.1 96 | 33.0 97 | 50.0 98 | 19.1 99 | 24.7 100 | 24.5 101 | 19.0 102 | 23.3 103 | 22.9 104 | 28.2 105 | 24.1 106 | 26.4 107 | 50.0 108 | 48.5 109 | 11.3 110 | 29.4 111 | 10.2 112 | 13.6 113 | 13.0 114 | 24.4 115 | 15.6 116 | 9.6 117 | 22.3 118 | 19.9 119 | 46.7 120 | 19.2 121 | 20.7 122 | 24.4 123 | 5.0 124 | 22.8 125 | 19.1 126 | 29.8 127 | 13.8 128 | 18.2 129 | 46.0 130 | 18.3 131 | 29.8 132 | 14.2 133 | 21.4 134 | 19.6 135 | 19.3 136 | 20.0 137 | 24.8 138 | 37.9 139 | 24.8 140 | 24.6 141 | 22.6 142 | 16.1 143 | 10.4 144 | 14.1 145 | 23.9 146 | 50.0 147 | 25.0 148 | 19.6 149 | 18.6 150 | 16.5 151 | 33.4 152 | 19.4 153 | 20.6 154 | 15.4 155 | 20.5 156 | 22.4 157 | 28.7 158 | 20.5 159 | 18.2 160 | 19.3 161 | 24.4 162 | 22.0 163 | 13.8 164 | 14.5 165 | 50.0 166 | 41.7 167 | 22.0 168 | 20.8 169 | 12.3 170 | 42.8 171 | 23.6 172 | 23.9 173 | 23.0 174 | 14.4 175 | 22.8 176 | 50.0 177 | 16.6 178 | 19.9 179 | 20.1 180 | 24.7 181 | 22.1 182 | 12.1 183 | 42.3 184 | 17.1 185 | 24.4 186 | 29.9 187 | 17.1 188 | 22.0 189 | 20.6 190 | 35.4 191 | 33.4 192 | 19.0 193 | 34.9 194 | 15.1 195 | 22.0 196 | 33.8 197 | 8.7 198 | 27.9 199 | 33.2 200 | 37.3 201 | 7.2 202 | 19.7 203 | 31.6 204 | 50.0 205 | 12.8 206 | 22.7 207 | 23.3 208 | 13.3 209 | 20.3 210 | 24.5 211 | 19.6 212 | 16.6 213 | 11.8 214 | 50.0 215 | 13.9 216 | 20.8 217 | 19.5 218 | 33.1 219 | 14.4 220 | 19.3 221 | 16.2 222 | 13.1 223 | 23.9 224 | 19.2 225 | 20.6 226 | 21.8 227 | 20.3 228 | 23.6 229 | 28.7 230 | 26.6 231 | 44.0 232 | 43.1 233 | 14.6 234 | 27.5 235 | 16.7 236 | 37.0 237 | 19.8 238 | 29.1 239 | 27.5 240 | 23.2 241 | 13.3 242 | 50.0 243 | 50.0 244 | 16.5 245 | 23.7 246 | 14.9 247 | 48.8 248 | 17.3 249 | 23.2 250 | 22.2 251 | 9.5 252 | 18.7 253 | 20.9 254 | 15.6 255 | 28.4 256 | 28.1 257 | 31.2 258 | 13.1 259 | 37.2 260 | 22.0 261 | 11.5 262 | 13.8 263 | 39.8 264 | 28.5 265 | 15.2 266 | 23.8 267 | 19.4 268 | 27.1 269 | 18.9 270 | 17.9 271 | 45.4 272 | 15.6 273 | 21.6 274 | 21.4 275 | 19.9 276 | 17.8 277 | 23.0 278 | 15.4 279 | 8.3 280 | 27.0 281 | 36.0 282 | 22.8 283 | 17.1 284 | 22.6 285 | 23.9 286 | 17.7 287 | 31.5 288 | 8.4 289 | 14.5 290 | 13.4 291 | 15.7 292 | 17.5 293 | 15.0 294 | 21.8 295 | 18.4 296 | 25.1 297 | 19.4 298 | 17.6 299 | 18.2 300 | 24.3 301 | 23.1 302 | 24.1 303 | 23.2 304 | 20.6 305 | -------------------------------------------------------------------------------- /tests/data/regression/train_labels_reg.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 7 3 | 8 4 | 4 5 | 8 6 | 6 7 | 9 8 | 2 9 | 9 10 | 1 11 | 2 12 | 10 13 | 3 14 | 10 15 | 6 16 | 4 17 | 2 18 | 4 19 | 9 20 | 8 21 | 1 22 | 1 23 | 7 24 | 4 25 | 1 26 | 4 27 | 9 28 | 9 29 | 7 30 | 5 31 | 8 32 | 9 33 | 6 34 | 2 35 | 3 36 | 9 37 | 10 38 | 2 39 | 9 40 | 7 41 | 2 42 | 10 43 | 9 44 | 2 45 | 2 46 | 7 47 | 10 48 | 8 49 | 1 50 | 7 51 | 4 52 | 7 53 | 5 54 | 1 55 | 2 56 | 3 57 | 10 58 | 7 59 | 8 60 | 3 61 | 1 62 | 5 63 | 9 64 | 6 65 | 9 66 | 2 67 | 1 68 | 3 69 | 10 70 | 10 71 | 9 72 | 1 73 | 8 74 | 2 75 | 10 76 | 9 77 | 6 78 | 10 79 | 1 80 | 9 81 | 3 82 | 5 83 | 8 84 | 2 85 | 7 86 | 7 87 | 8 88 | 1 89 | 5 90 | 7 91 | 2 92 | 10 93 | 4 94 | 7 95 | 10 96 | 6 97 | 9 98 | 9 99 | 7 100 | 3 101 | 4 102 | 9 103 | 9 104 | 1 105 | 1 106 | 9 107 | 1 108 | 5 109 | 5 110 | 1 111 | 8 112 | 1 113 | 3 114 | 1 115 | 10 116 | 8 117 | 5 118 | 6 119 | 6 120 | 5 121 | 2 122 | 4 123 | 9 124 | 2 125 | 7 126 | 7 127 | 4 128 | 4 129 | 4 130 | 8 131 | 4 132 | 9 133 | 3 134 | 4 135 | 9 136 | 10 137 | 5 138 | 9 139 | 8 140 | 2 141 | 6 142 | 9 143 | 9 144 | 3 145 | 10 146 | 9 147 | 4 148 | 1 149 | 10 150 | 9 151 | 9 152 | 8 153 | 6 154 | 4 155 | 7 156 | 2 157 | 1 158 | 1 159 | 6 160 | 7 161 | 9 162 | 4 163 | 9 164 | 8 165 | 1 166 | 5 167 | 3 168 | 1 169 | 6 170 | 9 171 | 8 172 | 7 173 | 2 174 | 4 175 | 6 176 | 8 177 | 9 178 | 8 179 | 8 180 | 7 181 | 1 182 | 10 183 | 10 184 | 5 185 | 9 186 | 1 187 | 6 188 | 7 189 | 5 190 | 10 191 | 1 192 | 1 193 | 4 194 | 7 195 | 7 196 | 1 197 | 2 198 | 8 199 | 9 200 | 5 201 | 9 202 | 10 203 | 9 204 | 9 205 | 5 206 | 2 207 | 7 208 | 2 209 | 2 210 | 9 211 | 5 212 | 8 213 | 7 214 | 6 215 | 7 216 | 10 217 | 8 218 | 10 219 | 6 220 | 10 221 | 8 222 | 6 223 | 4 224 | 4 225 | 7 226 | 2 227 | 7 228 | 6 229 | 7 230 | 9 231 | 2 232 | 7 233 | 9 234 | 2 235 | 5 236 | 1 237 | 8 238 | 2 239 | 9 240 | 1 241 | 3 242 | 5 243 | 5 244 | 7 245 | 2 246 | 9 247 | 5 248 | 7 249 | 3 250 | 2 251 | 10 252 | 10 253 | 6 254 | 9 255 | 8 256 | 4 257 | 6 258 | 10 259 | 5 260 | 1 261 | 2 262 | 4 263 | 9 264 | 10 265 | 5 266 | 10 267 | 4 268 | 2 269 | 4 270 | 1 271 | 3 272 | 10 273 | 1 274 | 3 275 | 5 276 | 9 277 | 6 278 | 8 279 | 10 280 | 2 281 | 6 282 | 5 283 | 1 284 | 10 285 | 1 286 | 3 287 | 6 288 | 7 289 | 3 290 | 2 291 | 6 292 | 3 293 | 1 294 | 3 295 | 6 296 | 10 297 | 1 298 | 3 299 | 10 300 | 6 301 | 7 302 | 3 303 | 8 304 | 6 305 | 3 306 | 3 307 | 5 308 | 10 309 | 9 310 | 4 311 | 9 312 | 9 313 | 4 314 | 9 315 | 8 316 | 2 317 | 7 318 | 10 319 | 5 320 | 2 321 | 1 322 | 5 323 | 7 324 | 8 325 | 1 326 | 8 327 | 6 328 | 8 329 | 7 330 | 1 331 | 3 332 | 9 333 | 8 334 | 4 335 | 10 336 | 1 337 | 2 338 | 3 339 | 10 340 | 5 341 | 10 342 | 8 343 | 10 344 | 8 345 | 5 346 | 8 347 | 8 348 | 9 349 | 7 350 | 3 351 | 2 352 | 7 353 | 10 354 | 2 355 | 8 356 | 7 357 | 9 358 | 1 359 | 4 360 | 4 361 | 4 362 | 2 363 | 3 364 | 7 365 | 3 366 | 4 367 | 6 368 | 6 369 | 2 370 | 5 371 | 6 372 | 10 373 | 5 374 | 3 375 | 8 376 | 2 377 | 8 378 | 5 379 | 7 380 | 3 381 | 1 382 | 9 383 | 3 384 | 4 385 | 4 386 | 2 387 | 10 388 | 3 389 | 1 390 | 6 391 | 9 392 | 8 393 | 4 394 | 5 395 | 4 396 | 5 397 | 4 398 | 9 399 | 6 400 | 3 401 | 5 402 | 8 403 | 6 404 | 5 405 | 3 406 | 7 407 | 7 408 | 8 409 | 4 410 | 4 411 | 10 412 | 5 413 | 7 414 | 3 415 | 8 416 | 9 417 | 2 418 | 7 419 | 6 420 | 3 421 | 2 422 | 3 423 | 4 424 | 8 425 | 6 426 | 6 427 | 3 428 | 8 429 | 10 430 | 6 431 | 3 432 | 5 433 | 9 434 | 4 435 | 2 436 | 4 437 | 5 438 | 5 439 | 2 440 | 1 441 | 4 442 | 6 443 | 2 444 | 7 445 | 5 446 | 5 447 | 7 448 | 7 449 | 5 450 | 4 451 | 2 452 | 8 453 | 6 454 | 8 455 | 3 456 | 5 457 | 3 458 | 4 459 | 5 460 | 6 461 | 1 462 | 9 463 | 3 464 | 9 465 | 8 466 | 1 467 | 9 468 | 10 469 | 10 470 | 2 471 | 8 472 | 2 473 | 8 474 | 7 475 | 2 476 | 9 477 | 6 478 | 7 479 | 8 480 | 5 481 | 5 482 | 8 483 | 2 484 | 5 485 | 7 486 | 7 487 | 5 488 | 8 489 | 1 490 | 1 491 | 8 492 | 5 493 | 1 494 | 10 495 | 1 496 | 4 497 | 9 498 | 9 499 | 1 500 | 10 501 | 4 502 | 1 503 | 3 504 | 2 505 | 5 506 | 9 507 | 9 508 | 2 509 | 7 510 | 5 511 | 3 512 | 2 513 | 8 514 | 1 515 | 2 516 | 4 517 | 4 518 | 2 519 | 8 520 | 3 521 | 1 522 | 4 523 | 6 524 | 2 525 | 1 526 | 2 527 | 8 528 | 10 529 | 8 530 | 7 531 | 6 532 | 6 533 | 3 534 | 6 535 | 6 -------------------------------------------------------------------------------- /tests/data/regression/val_labels.csv: -------------------------------------------------------------------------------- 1 | Target 2 | 33.2 3 | 9.7 4 | 24.5 5 | 20.4 6 | 13.8 7 | 50.0 8 | 24.3 9 | 24.8 10 | 24.0 11 | 19.5 12 | 24.0 13 | 11.8 14 | 13.4 15 | 13.3 16 | 22.2 17 | 25.0 18 | 17.8 19 | 19.4 20 | 21.7 21 | 26.5 22 | 21.7 23 | 16.4 24 | 26.6 25 | 32.4 26 | 8.4 27 | 30.5 28 | 21.0 29 | 30.1 30 | 36.4 31 | 50.0 32 | 21.9 33 | 19.5 34 | 22.9 35 | 50.0 36 | 23.7 37 | 10.4 38 | 32.5 39 | 29.0 40 | 8.8 41 | 23.0 42 | 19.5 43 | 21.7 44 | 21.4 45 | 22.5 46 | 21.2 47 | 21.1 48 | 25.0 49 | 12.0 50 | 22.2 51 | 19.4 52 | 14.0 53 | 30.7 54 | 20.2 55 | 23.8 56 | 20.1 57 | 21.9 58 | 25.2 59 | 23.3 60 | 23.0 61 | 23.7 62 | 20.1 63 | 23.4 64 | 13.6 65 | 16.8 66 | 31.1 67 | 25.0 68 | 31.6 69 | 5.0 70 | 20.3 71 | 15.3 72 | 20.4 73 | 41.3 74 | 34.6 75 | 18.6 76 | 27.1 77 | 30.1 78 | 12.6 79 | 18.5 80 | 15.2 81 | 20.6 82 | 24.6 83 | 20.1 84 | 26.4 85 | 21.5 86 | 17.8 87 | 21.0 88 | 50.0 89 | 18.4 90 | 21.0 91 | 15.0 92 | 31.7 93 | 21.7 94 | 44.8 95 | 22.5 96 | 30.3 97 | 7.0 98 | 22.6 99 | 17.2 100 | 30.1 101 | 23.1 102 | 18.9 103 | -------------------------------------------------------------------------------- /tests/data/test_features.csv: -------------------------------------------------------------------------------- 1 | Pclass,Sex,Age,Fare,Family_cnt,Cabin_ind 2 | 3,0,18.0,20.2125,2,0 3 | 3,0,29.69911764705882,8.05,0,0 4 | 3,0,40.5,7.75,0,0 5 | 3,1,31.0,20.525,2,0 6 | 2,0,32.0,10.5,0,0 7 | 1,0,28.0,47.1,0,0 8 | 1,1,16.0,39.4,1,1 9 | 1,1,50.0,247.5208,1,1 10 | 3,0,28.0,9.5,0,0 11 | 3,0,25.0,7.25,0,0 12 | 1,1,40.0,134.5,2,1 13 | 3,0,33.0,8.6625,0,0 14 | 3,0,29.69911764705882,14.4583,0,0 15 | 2,1,31.0,26.25,2,0 16 | 3,1,48.0,34.375,4,0 17 | 1,1,49.0,25.9292,0,1 18 | 3,0,21.0,7.925,0,0 19 | 3,1,1.0,15.7417,2,0 20 | 3,1,18.0,17.8,1,0 21 | 2,0,16.0,10.5,0,0 22 | 3,0,21.0,8.4333,0,0 23 | 3,0,29.69911764705882,7.8958,0,0 24 | 3,0,19.0,0.0,0,0 25 | 3,1,29.69911764705882,7.55,0,0 26 | 3,0,26.0,7.8542,1,0 27 | 2,1,25.0,26.0,1,0 28 | 2,0,66.0,10.5,0,0 29 | 1,0,50.0,55.9,1,1 30 | 3,0,10.0,27.9,5,0 31 | 1,1,39.0,83.1583,2,1 32 | 1,0,65.0,26.55,0,1 33 | 1,1,19.0,26.2833,2,1 34 | 3,0,29.69911764705882,7.8292,0,0 35 | 1,1,29.69911764705882,146.5208,1,1 36 | 1,0,36.0,26.2875,0,1 37 | 3,0,29.69911764705882,7.8958,0,0 38 | 3,1,19.0,7.8542,1,0 39 | 3,0,17.0,8.6625,0,0 40 | 3,0,29.69911764705882,7.8958,0,0 41 | 3,0,9.0,20.525,2,0 42 | 3,0,15.0,7.2292,2,0 43 | 3,0,19.0,7.8958,0,0 44 | 2,0,24.0,10.5,0,0 45 | 3,0,30.0,9.5,0,0 46 | 3,1,29.69911764705882,7.7875,0,0 47 | 3,1,26.0,7.925,0,0 48 | 1,1,18.0,79.65,2,1 49 | 1,1,26.0,78.85,0,0 50 | 3,0,16.0,34.375,4,0 51 | 3,0,25.0,7.05,0,0 52 | 2,0,29.69911764705882,15.05,0,0 53 | 3,0,29.69911764705882,8.6625,0,0 54 | 3,0,29.69911764705882,23.45,3,0 55 | 2,1,38.0,13.0,0,0 56 | 1,1,54.0,59.4,1,0 57 | 1,0,45.0,26.55,0,1 58 | 2,1,6.0,33.0,1,0 59 | 1,0,71.0,34.6542,0,1 60 | 3,1,30.5,7.75,0,0 61 | 3,0,22.0,7.25,0,0 62 | 1,0,29.69911764705882,25.925,0,0 63 | 3,0,19.0,8.1583,0,0 64 | 3,0,50.0,8.05,0,0 65 | 1,1,22.0,49.5,2,1 66 | 1,0,26.0,30.0,0,1 67 | 1,0,56.0,30.6958,0,1 68 | 3,0,29.69911764705882,7.8958,0,0 69 | 2,0,34.0,13.0,0,0 70 | 1,0,50.0,133.65,2,0 71 | 3,0,29.69911764705882,7.7292,0,0 72 | 3,0,20.0,7.05,0,0 73 | 1,1,35.0,90.0,1,1 74 | 1,1,29.69911764705882,133.65,1,0 75 | 2,0,25.0,13.0,0,0 76 | 2,0,3.0,26.0,2,1 77 | 3,0,36.0,15.55,1,0 78 | 3,0,27.0,6.975,0,0 79 | 3,0,20.0,7.925,1,0 80 | 1,0,42.0,52.5542,1,1 81 | 2,0,21.0,73.5,0,0 82 | 2,0,29.69911764705882,0.0,0,0 83 | 3,0,16.0,18.0,2,0 84 | 3,0,26.0,14.4542,1,0 85 | 3,0,18.0,7.7958,0,0 86 | 3,1,24.0,16.7,2,1 87 | 2,0,29.69911764705882,13.8625,0,0 88 | 3,0,29.69911764705882,7.25,0,0 89 | 2,1,36.0,26.0,1,0 90 | 1,0,40.0,31.0,0,1 91 | 1,0,28.0,26.55,0,1 92 | 3,0,21.0,7.775,0,0 93 | 1,0,29.69911764705882,221.7792,0,1 94 | 3,0,22.0,8.05,0,0 95 | 1,1,29.69911764705882,52.0,1,1 96 | 3,0,49.0,0.0,0,0 97 | 1,0,0.92,151.55,3,1 98 | 3,1,29.69911764705882,7.8292,0,0 99 | 2,1,34.0,32.5,2,0 100 | 3,0,29.69911764705882,14.5,0,0 101 | 3,0,35.0,7.125,0,0 102 | 2,0,54.0,26.0,0,0 103 | 3,1,6.0,31.275,6,0 104 | 2,1,27.0,21.0,1,0 105 | 3,0,29.0,7.775,0,0 106 | 3,0,29.69911764705882,7.05,0,0 107 | 1,0,29.69911764705882,30.5,0,1 108 | 3,0,29.69911764705882,25.4667,4,0 109 | 3,1,63.0,9.5875,0,0 110 | 3,1,9.0,15.2458,2,0 111 | 3,1,47.0,14.5,1,0 112 | 1,0,65.0,61.9792,1,1 113 | 2,1,41.0,19.5,1,0 114 | 1,0,47.0,52.0,0,1 115 | 2,0,23.0,15.0458,0,0 116 | 3,1,41.0,20.2125,2,0 117 | 1,0,54.0,51.8625,0,1 118 | 2,0,27.0,13.0,0,0 119 | 3,0,30.0,7.25,0,0 120 | 3,0,30.5,8.05,0,0 121 | 1,1,38.0,80.0,0,1 122 | 2,1,22.0,29.0,2,0 123 | 3,1,22.0,7.75,0,0 124 | 1,0,28.0,35.5,0,1 125 | 3,1,29.69911764705882,24.15,1,0 126 | 3,1,38.0,31.3875,6,0 127 | 2,1,40.0,13.0,0,0 128 | 1,0,52.0,30.5,0,1 129 | 1,1,29.69911764705882,51.8625,1,1 130 | 3,0,22.0,7.8958,0,0 131 | 3,1,19.0,7.8792,0,0 132 | 3,0,20.5,7.25,0,0 133 | 3,0,20.0,8.05,0,0 134 | 3,1,29.69911764705882,7.75,0,0 135 | 3,1,22.0,10.5167,0,0 136 | 1,1,42.0,227.525,0,0 137 | 1,0,37.0,53.1,1,1 138 | 1,1,29.69911764705882,82.1708,1,0 139 | 3,0,38.0,7.05,0,0 140 | 2,1,29.0,10.5,0,1 141 | 3,0,29.69911764705882,7.225,0,0 142 | 2,1,7.0,26.25,2,0 143 | 2,1,17.0,10.5,0,0 144 | 3,0,32.0,7.925,0,0 145 | 2,0,57.0,12.35,0,0 146 | 3,0,29.0,9.5,0,0 147 | 1,0,61.0,32.3208,0,1 148 | 1,1,52.0,78.2667,1,1 149 | 3,1,18.0,9.8417,0,0 150 | 1,0,48.0,52.0,1,1 151 | 2,0,37.0,26.0,1,0 152 | 2,0,43.0,26.25,2,0 153 | 3,0,45.0,8.05,0,0 154 | 2,1,50.0,26.0,1,0 155 | 3,0,17.0,7.2292,2,0 156 | 3,0,20.0,9.225,0,0 157 | 3,1,29.69911764705882,7.75,0,0 158 | 3,1,39.0,29.125,5,0 159 | 1,1,63.0,77.9583,1,1 160 | 3,0,29.0,7.875,0,0 161 | 3,0,1.0,39.6875,5,0 162 | 2,1,21.0,10.5,0,0 163 | 1,0,35.0,26.55,0,0 164 | 2,0,30.0,13.0,0,0 165 | 3,1,11.0,31.275,6,0 166 | 1,1,31.0,113.275,1,1 167 | 1,0,49.0,89.1042,1,1 168 | 3,1,31.0,18.0,1,0 169 | 2,0,19.0,36.75,2,0 170 | 2,1,24.0,14.5,2,0 171 | 2,0,36.0,27.75,3,0 172 | 1,0,36.0,26.3875,0,1 173 | 3,0,22.0,7.2292,0,0 174 | 2,0,23.0,13.0,0,0 175 | 3,1,30.0,12.475,0,0 176 | 3,0,21.0,8.05,0,0 177 | 1,1,30.0,31.0,0,0 178 | 3,0,44.0,8.05,0,0 179 | 1,1,21.0,262.375,4,1 180 | 1,1,38.0,227.525,0,1 181 | -------------------------------------------------------------------------------- /tests/data/test_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 0 3 | 0 4 | 0 5 | 1 6 | 0 7 | 0 8 | 1 9 | 1 10 | 0 11 | 0 12 | 1 13 | 0 14 | 0 15 | 1 16 | 0 17 | 1 18 | 0 19 | 1 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 1 28 | 0 29 | 0 30 | 0 31 | 1 32 | 0 33 | 1 34 | 0 35 | 1 36 | 1 37 | 0 38 | 1 39 | 0 40 | 0 41 | 1 42 | 0 43 | 0 44 | 0 45 | 1 46 | 1 47 | 1 48 | 1 49 | 1 50 | 0 51 | 0 52 | 0 53 | 0 54 | 0 55 | 0 56 | 1 57 | 0 58 | 1 59 | 0 60 | 0 61 | 0 62 | 0 63 | 0 64 | 0 65 | 1 66 | 1 67 | 0 68 | 0 69 | 0 70 | 1 71 | 0 72 | 0 73 | 1 74 | 1 75 | 0 76 | 1 77 | 0 78 | 1 79 | 1 80 | 1 81 | 0 82 | 0 83 | 0 84 | 0 85 | 0 86 | 1 87 | 1 88 | 0 89 | 1 90 | 1 91 | 1 92 | 0 93 | 0 94 | 0 95 | 1 96 | 0 97 | 1 98 | 1 99 | 1 100 | 0 101 | 0 102 | 0 103 | 0 104 | 0 105 | 0 106 | 0 107 | 1 108 | 0 109 | 1 110 | 0 111 | 0 112 | 0 113 | 1 114 | 0 115 | 0 116 | 0 117 | 0 118 | 0 119 | 0 120 | 0 121 | 1 122 | 1 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 0 131 | 1 132 | 0 133 | 0 134 | 1 135 | 0 136 | 1 137 | 0 138 | 1 139 | 0 140 | 1 141 | 0 142 | 1 143 | 1 144 | 0 145 | 0 146 | 1 147 | 0 148 | 1 149 | 1 150 | 1 151 | 0 152 | 0 153 | 1 154 | 1 155 | 0 156 | 0 157 | 1 158 | 0 159 | 1 160 | 0 161 | 0 162 | 1 163 | 1 164 | 0 165 | 0 166 | 1 167 | 1 168 | 0 169 | 0 170 | 1 171 | 0 172 | 1 173 | 0 174 | 0 175 | 1 176 | 0 177 | 1 178 | 0 179 | 1 180 | 1 181 | -------------------------------------------------------------------------------- /tests/data/train_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 1 3 | 0 4 | 1 5 | 0 6 | 1 7 | 0 8 | 0 9 | 0 10 | 1 11 | 0 12 | 0 13 | 0 14 | 0 15 | 1 16 | 0 17 | 1 18 | 1 19 | 0 20 | 0 21 | 1 22 | 1 23 | 1 24 | 0 25 | 1 26 | 0 27 | 1 28 | 1 29 | 0 30 | 0 31 | 0 32 | 0 33 | 0 34 | 0 35 | 0 36 | 1 37 | 1 38 | 1 39 | 1 40 | 1 41 | 0 42 | 0 43 | 0 44 | 1 45 | 1 46 | 0 47 | 1 48 | 0 49 | 1 50 | 1 51 | 1 52 | 0 53 | 1 54 | 0 55 | 0 56 | 0 57 | 1 58 | 1 59 | 0 60 | 1 61 | 1 62 | 0 63 | 0 64 | 0 65 | 1 66 | 0 67 | 1 68 | 0 69 | 0 70 | 0 71 | 1 72 | 0 73 | 1 74 | 1 75 | 1 76 | 0 77 | 1 78 | 0 79 | 0 80 | 0 81 | 0 82 | 0 83 | 0 84 | 0 85 | 1 86 | 0 87 | 0 88 | 1 89 | 0 90 | 0 91 | 0 92 | 1 93 | 0 94 | 0 95 | 1 96 | 0 97 | 1 98 | 0 99 | 0 100 | 0 101 | 0 102 | 1 103 | 0 104 | 0 105 | 0 106 | 0 107 | 1 108 | 0 109 | 0 110 | 1 111 | 0 112 | 0 113 | 1 114 | 1 115 | 1 116 | 0 117 | 0 118 | 0 119 | 1 120 | 1 121 | 0 122 | 1 123 | 1 124 | 0 125 | 1 126 | 0 127 | 1 128 | 0 129 | 0 130 | 0 131 | 0 132 | 1 133 | 1 134 | 1 135 | 1 136 | 0 137 | 1 138 | 1 139 | 1 140 | 0 141 | 0 142 | 0 143 | 0 144 | 0 145 | 1 146 | 0 147 | 0 148 | 0 149 | 0 150 | 0 151 | 0 152 | 0 153 | 1 154 | 0 155 | 1 156 | 0 157 | 0 158 | 0 159 | 0 160 | 0 161 | 1 162 | 1 163 | 0 164 | 1 165 | 0 166 | 0 167 | 1 168 | 0 169 | 1 170 | 0 171 | 1 172 | 0 173 | 0 174 | 0 175 | 0 176 | 1 177 | 0 178 | 0 179 | 0 180 | 0 181 | 0 182 | 1 183 | 1 184 | 1 185 | 1 186 | 1 187 | 0 188 | 1 189 | 1 190 | 0 191 | 1 192 | 0 193 | 1 194 | 1 195 | 0 196 | 1 197 | 0 198 | 1 199 | 0 200 | 1 201 | 0 202 | 0 203 | 0 204 | 0 205 | 0 206 | 0 207 | 0 208 | 0 209 | 1 210 | 0 211 | 0 212 | 0 213 | 0 214 | 1 215 | 0 216 | 0 217 | 0 218 | 0 219 | 1 220 | 0 221 | 0 222 | 0 223 | 0 224 | 1 225 | 0 226 | 1 227 | 0 228 | 0 229 | 1 230 | 1 231 | 0 232 | 0 233 | 0 234 | 0 235 | 0 236 | 1 237 | 0 238 | 0 239 | 1 240 | 0 241 | 0 242 | 0 243 | 0 244 | 0 245 | 1 246 | 1 247 | 0 248 | 0 249 | 0 250 | 0 251 | 0 252 | 1 253 | 1 254 | 0 255 | 1 256 | 1 257 | 0 258 | 1 259 | 1 260 | 0 261 | 1 262 | 0 263 | 0 264 | 1 265 | 0 266 | 1 267 | 0 268 | 0 269 | 0 270 | 0 271 | 0 272 | 1 273 | 0 274 | 0 275 | 0 276 | 1 277 | 0 278 | 0 279 | 1 280 | 0 281 | 0 282 | 0 283 | 1 284 | 0 285 | 1 286 | 1 287 | 1 288 | 1 289 | 1 290 | 0 291 | 0 292 | 0 293 | 1 294 | 1 295 | 0 296 | 1 297 | 0 298 | 1 299 | 0 300 | 0 301 | 0 302 | 0 303 | 1 304 | 0 305 | 0 306 | 0 307 | 0 308 | 1 309 | 0 310 | 0 311 | 1 312 | 0 313 | 0 314 | 0 315 | 0 316 | 1 317 | 0 318 | 0 319 | 0 320 | 1 321 | 1 322 | 0 323 | 0 324 | 1 325 | 0 326 | 0 327 | 1 328 | 1 329 | 0 330 | 0 331 | 0 332 | 1 333 | 1 334 | 0 335 | 0 336 | 0 337 | 0 338 | 0 339 | 0 340 | 1 341 | 1 342 | 1 343 | 1 344 | 0 345 | 1 346 | 0 347 | 1 348 | 0 349 | 0 350 | 1 351 | 1 352 | 0 353 | 0 354 | 0 355 | 0 356 | 1 357 | 0 358 | 0 359 | 1 360 | 1 361 | 1 362 | 0 363 | 1 364 | 1 365 | 0 366 | 0 367 | 0 368 | 0 369 | 0 370 | 1 371 | 0 372 | 0 373 | 1 374 | 1 375 | 1 376 | 0 377 | 0 378 | 0 379 | 0 380 | 1 381 | 1 382 | 1 383 | 1 384 | 0 385 | 0 386 | 0 387 | 0 388 | 0 389 | 0 390 | 0 391 | 1 392 | 1 393 | 0 394 | 1 395 | 0 396 | 0 397 | 1 398 | 1 399 | 1 400 | 0 401 | 0 402 | 1 403 | 1 404 | 0 405 | 0 406 | 0 407 | 0 408 | 1 409 | 1 410 | 0 411 | 1 412 | 0 413 | 0 414 | 1 415 | 0 416 | 0 417 | 0 418 | 0 419 | 0 420 | 1 421 | 1 422 | 0 423 | 1 424 | 0 425 | 0 426 | 1 427 | 0 428 | 0 429 | 0 430 | 1 431 | 1 432 | 1 433 | 1 434 | 1 435 | 0 436 | 0 437 | 1 438 | 0 439 | 1 440 | 0 441 | 1 442 | 0 443 | 1 444 | 1 445 | 1 446 | 0 447 | 1 448 | 0 449 | 0 450 | 0 451 | 0 452 | 0 453 | 0 454 | 0 455 | 0 456 | 1 457 | 1 458 | 0 459 | 0 460 | 0 461 | 0 462 | 0 463 | 0 464 | 0 465 | 1 466 | 0 467 | 1 468 | 0 469 | 0 470 | 0 471 | 1 472 | 0 473 | 1 474 | 0 475 | 1 476 | 1 477 | 1 478 | 0 479 | 1 480 | 0 481 | 0 482 | 0 483 | 1 484 | 0 485 | 1 486 | 1 487 | 0 488 | 0 489 | 0 490 | 0 491 | 0 492 | 0 493 | 0 494 | 0 495 | 1 496 | 1 497 | 1 498 | 0 499 | 0 500 | 1 501 | 0 502 | 1 503 | 0 504 | 0 505 | 0 506 | 0 507 | 0 508 | 0 509 | 0 510 | 0 511 | 0 512 | 0 513 | 0 514 | 0 515 | 0 516 | 0 517 | 0 518 | 1 519 | 0 520 | 0 521 | 0 522 | 1 523 | 1 524 | 0 525 | 0 526 | 0 527 | 0 528 | 0 529 | 1 530 | 0 531 | 1 532 | 0 533 | 0 534 | 1 535 | 0 536 | -------------------------------------------------------------------------------- /tests/data/val_features.csv: -------------------------------------------------------------------------------- 1 | Pclass,Sex,Age,Fare,Family_cnt,Cabin_ind 2 | 1,1,29.69911764705882,89.1042,1,1 3 | 1,0,45.5,28.5,0,1 4 | 3,0,29.69911764705882,7.75,0,0 5 | 2,1,24.0,26.0,1,0 6 | 2,0,36.0,12.875,0,1 7 | 3,0,29.69911764705882,7.75,0,0 8 | 3,0,29.69911764705882,8.1125,0,0 9 | 2,0,36.0,10.5,0,0 10 | 3,0,21.0,7.8,0,0 11 | 3,0,29.69911764705882,8.4583,0,0 12 | 2,0,52.0,13.5,0,0 13 | 3,0,29.69911764705882,7.225,0,0 14 | 3,0,29.69911764705882,8.05,0,0 15 | 3,0,34.5,6.4375,0,0 16 | 3,0,20.0,7.925,0,0 17 | 3,0,20.0,9.8458,0,0 18 | 1,1,17.0,57.0,1,1 19 | 1,0,29.69911764705882,50.0,0,1 20 | 3,0,32.0,8.05,0,1 21 | 2,0,23.0,11.5,3,0 22 | 3,0,29.0,8.05,0,0 23 | 3,1,29.69911764705882,7.8792,0,0 24 | 3,0,16.0,20.25,2,0 25 | 1,0,24.0,79.2,0,1 26 | 3,0,23.0,7.8542,0,0 27 | 3,0,4.0,11.1333,2,0 28 | 3,1,31.0,7.8542,0,0 29 | 3,0,29.69911764705882,7.7375,0,0 30 | 3,0,29.69911764705882,15.5,0,0 31 | 1,0,47.0,38.5,0,1 32 | 1,0,27.0,211.5,2,1 33 | 3,0,23.0,7.8958,0,0 34 | 3,1,5.0,12.475,0,0 35 | 1,0,24.0,247.5208,1,1 36 | 1,0,50.0,106.425,1,1 37 | 3,1,45.0,14.4542,1,0 38 | 3,1,21.0,34.375,4,0 39 | 2,1,57.0,10.5,0,1 40 | 3,0,17.0,8.6625,0,0 41 | 1,0,71.0,49.5042,0,0 42 | 2,0,29.0,27.7208,1,0 43 | 2,1,26.0,26.0,2,0 44 | 3,1,32.0,15.5,2,0 45 | 3,1,29.69911764705882,25.4667,4,0 46 | 3,0,27.0,14.4542,1,0 47 | 3,0,4.0,27.9,5,0 48 | 1,0,23.0,63.3583,1,1 49 | 2,0,28.0,13.0,0,0 50 | 3,0,29.69911764705882,8.7125,0,0 51 | 2,1,24.0,13.0,0,0 52 | 3,0,29.69911764705882,15.2458,2,0 53 | 3,1,29.69911764705882,7.2292,0,0 54 | 1,1,52.0,93.5,2,1 55 | 1,0,4.0,81.8583,2,1 56 | 3,0,28.0,7.8542,0,0 57 | 3,0,44.0,8.05,0,0 58 | 3,1,4.0,16.7,2,1 59 | 3,0,20.0,7.2292,0,0 60 | 2,0,0.83,29.0,2,0 61 | 3,0,29.0,7.0458,1,0 62 | 3,0,29.69911764705882,7.25,0,0 63 | 1,1,39.0,110.8833,2,1 64 | 3,0,29.0,9.4833,0,0 65 | 1,1,29.69911764705882,110.8833,0,0 66 | 1,0,40.0,27.7208,0,0 67 | 3,0,29.69911764705882,56.4958,0,0 68 | 2,1,44.0,26.0,1,0 69 | 3,0,29.69911764705882,8.05,0,0 70 | 2,0,25.0,41.5792,3,0 71 | 3,1,14.0,11.2417,1,0 72 | 3,0,29.69911764705882,15.2458,2,0 73 | 1,0,29.69911764705882,35.0,0,1 74 | 1,0,25.0,55.4417,1,1 75 | 2,1,50.0,10.5,0,0 76 | 1,0,64.0,26.0,0,0 77 | 3,0,22.0,7.5208,0,0 78 | 3,0,17.0,7.0542,1,0 79 | 2,0,8.0,36.75,2,0 80 | 3,0,29.69911764705882,7.725,0,0 81 | 2,1,18.0,13.0,2,0 82 | 2,1,36.0,13.0,0,1 83 | 3,0,2.0,21.075,4,0 84 | 2,1,13.0,19.5,1,0 85 | 3,0,23.0,9.225,0,0 86 | 1,0,29.69911764705882,30.6958,0,0 87 | 3,0,61.0,6.2375,0,0 88 | 2,1,45.0,13.5,0,0 89 | 2,0,31.0,13.0,0,0 90 | 3,0,26.0,8.6625,2,0 91 | 2,0,34.0,21.0,1,0 92 | 1,1,22.0,151.55,0,0 93 | 2,0,39.0,13.0,0,0 94 | 3,0,16.0,8.05,0,0 95 | 3,0,42.0,7.55,0,0 96 | 2,1,28.0,26.0,1,0 97 | 3,1,15.0,14.4542,1,0 98 | 3,1,29.69911764705882,14.4583,1,0 99 | 3,1,16.0,7.75,0,0 100 | 3,0,29.69911764705882,7.75,0,0 101 | 2,0,36.0,13.0,0,0 102 | 3,0,29.69911764705882,56.4958,0,0 103 | 2,0,21.0,73.5,2,0 104 | 3,1,29.69911764705882,7.75,0,0 105 | 3,0,19.0,7.65,0,1 106 | 2,1,25.0,30.0,2,0 107 | 2,0,39.0,13.0,0,0 108 | 2,0,24.0,13.0,0,0 109 | 1,1,62.0,80.0,0,1 110 | 1,0,36.0,120.0,3,1 111 | 1,1,33.0,90.0,1,1 112 | 3,1,23.0,7.925,0,0 113 | 2,0,36.5,26.0,2,1 114 | 3,0,26.0,7.8958,0,0 115 | 3,0,32.0,7.8542,0,0 116 | 3,0,29.69911764705882,7.8958,0,0 117 | 3,1,30.0,8.6625,0,0 118 | 1,0,29.69911764705882,26.55,0,0 119 | 3,0,29.69911764705882,7.75,0,0 120 | 1,0,51.0,61.3792,1,0 121 | 3,0,36.0,24.15,2,0 122 | 2,1,29.0,26.0,1,0 123 | 3,0,25.0,7.775,1,0 124 | 1,0,11.0,120.0,3,1 125 | 2,0,31.0,10.5,0,0 126 | 1,0,58.0,113.275,2,1 127 | 3,0,16.0,39.6875,5,0 128 | 3,1,29.69911764705882,22.3583,2,0 129 | 3,0,18.0,8.05,0,0 130 | 3,0,27.0,8.6625,0,0 131 | 3,1,9.0,31.275,6,0 132 | 3,0,40.0,27.9,5,0 133 | 1,0,29.69911764705882,0.0,0,0 134 | 2,1,42.0,26.0,1,0 135 | 3,0,30.0,7.225,0,0 136 | 1,0,38.0,0.0,0,0 137 | 1,0,38.0,153.4625,1,1 138 | 2,0,23.0,10.5,0,0 139 | 1,1,44.0,57.9792,1,1 140 | 1,0,49.0,56.9292,1,1 141 | 3,0,39.0,24.15,0,0 142 | 3,0,9.0,31.3875,6,0 143 | 3,1,8.0,21.075,4,0 144 | 3,1,20.0,8.6625,0,0 145 | 3,0,65.0,7.75,0,0 146 | 3,1,5.0,19.2583,3,0 147 | 3,0,17.0,7.125,0,0 148 | 2,1,42.0,13.0,0,0 149 | 3,1,43.0,46.9,7,0 150 | 3,0,29.69911764705882,7.8958,0,0 151 | 3,0,35.0,7.05,0,0 152 | 2,1,35.0,21.0,0,0 153 | 3,0,24.0,7.05,0,0 154 | 3,1,22.0,7.775,0,0 155 | 3,0,29.69911764705882,7.75,0,0 156 | 1,0,34.0,26.55,0,0 157 | 3,0,38.0,7.8958,0,0 158 | 3,0,23.5,7.2292,0,0 159 | 3,0,18.0,8.3,0,0 160 | 2,0,33.0,12.275,0,0 161 | 3,1,29.69911764705882,15.2458,2,0 162 | 1,1,51.0,77.9583,1,1 163 | 1,0,60.0,26.55,0,0 164 | 3,0,43.0,8.05,0,0 165 | 3,1,29.69911764705882,7.8792,0,0 166 | 3,0,24.0,7.4958,0,0 167 | 3,0,27.0,7.8958,0,0 168 | 1,1,30.0,56.9292,0,1 169 | 3,0,25.0,7.225,0,0 170 | 3,1,29.69911764705882,25.4667,4,0 171 | 1,1,32.0,76.2917,0,1 172 | 1,0,37.0,52.5542,2,1 173 | 3,0,24.0,7.8958,0,0 174 | 1,0,29.69911764705882,35.5,0,1 175 | 1,1,18.0,262.375,4,1 176 | 2,1,40.0,39.0,2,0 177 | 3,1,1.0,11.1333,2,0 178 | 1,0,60.0,79.2,2,1 179 | 1,1,19.0,91.0792,1,1 180 | -------------------------------------------------------------------------------- /tests/data/val_labels.csv: -------------------------------------------------------------------------------- 1 | Survived 2 | 1 3 | 0 4 | 0 5 | 1 6 | 0 7 | 0 8 | 1 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 0 18 | 1 19 | 0 20 | 1 21 | 0 22 | 0 23 | 1 24 | 0 25 | 0 26 | 0 27 | 1 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 0 34 | 1 35 | 0 36 | 0 37 | 0 38 | 0 39 | 0 40 | 0 41 | 0 42 | 0 43 | 0 44 | 0 45 | 0 46 | 0 47 | 0 48 | 1 49 | 0 50 | 0 51 | 0 52 | 1 53 | 1 54 | 1 55 | 1 56 | 0 57 | 0 58 | 1 59 | 1 60 | 1 61 | 0 62 | 0 63 | 1 64 | 0 65 | 1 66 | 0 67 | 1 68 | 0 69 | 0 70 | 0 71 | 1 72 | 1 73 | 0 74 | 1 75 | 1 76 | 0 77 | 0 78 | 0 79 | 1 80 | 0 81 | 1 82 | 1 83 | 0 84 | 1 85 | 0 86 | 0 87 | 0 88 | 1 89 | 1 90 | 0 91 | 0 92 | 1 93 | 0 94 | 1 95 | 0 96 | 1 97 | 1 98 | 0 99 | 1 100 | 0 101 | 0 102 | 1 103 | 0 104 | 0 105 | 0 106 | 1 107 | 0 108 | 0 109 | 1 110 | 1 111 | 1 112 | 0 113 | 0 114 | 0 115 | 1 116 | 0 117 | 0 118 | 1 119 | 0 120 | 0 121 | 0 122 | 1 123 | 0 124 | 1 125 | 0 126 | 0 127 | 0 128 | 1 129 | 1 130 | 1 131 | 0 132 | 0 133 | 0 134 | 1 135 | 0 136 | 0 137 | 0 138 | 0 139 | 1 140 | 1 141 | 0 142 | 0 143 | 0 144 | 0 145 | 0 146 | 1 147 | 0 148 | 1 149 | 0 150 | 0 151 | 0 152 | 1 153 | 0 154 | 1 155 | 0 156 | 1 157 | 0 158 | 0 159 | 0 160 | 0 161 | 0 162 | 1 163 | 0 164 | 0 165 | 1 166 | 0 167 | 0 168 | 1 169 | 0 170 | 0 171 | 1 172 | 1 173 | 0 174 | 1 175 | 1 176 | 1 177 | 1 178 | 1 179 | 1 180 | -------------------------------------------------------------------------------- /tests/dict_data.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/dict_data.pkl -------------------------------------------------------------------------------- /tests/dict_models_evaluate.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/dict_models_evaluate.pkl -------------------------------------------------------------------------------- /tests/dict_preprocess.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/dict_preprocess.pkl -------------------------------------------------------------------------------- /tests/dyna_report.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/dyna_report.pkl -------------------------------------------------------------------------------- /tests/logs/autoFS_log_2020.08.24.15.36.07.log: -------------------------------------------------------------------------------- 1 | 24/08 15:36:07 - INFO - #################################################################################################################################################################################################################################### 2 | 24/08 15:36:07 - INFO - Optimal Flow - autoFS - Auto Feature Selection Module :: 2020.08.24.15.36.07 3 | 24/08 15:36:07 - INFO - #################################################################################################################################################################################################################################### 4 | 24/08 15:36:07 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 24/08 15:36:07 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 24/08 15:36:07 - INFO - ------------------------------------------------------------ 7 | 24/08 15:36:07 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 24/08 15:36:07 - INFO - Deleted file:autoFS_log_2020.08.07.23.23.41.log 9 | 24/08 15:36:07 - INFO - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 10 | -------------------------------------------------------------------------------- /tests/paper/dict_data.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/paper/dict_data.pkl -------------------------------------------------------------------------------- /tests/paper/dict_models_evaluate.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/paper/dict_models_evaluate.pkl -------------------------------------------------------------------------------- /tests/paper/dict_preprocess.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/paper/dict_preprocess.pkl -------------------------------------------------------------------------------- /tests/paper/dyna_report.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/paper/dyna_report.pkl -------------------------------------------------------------------------------- /tests/paper/logs/autoCV_log_2020.10.19.10.27.18.log: -------------------------------------------------------------------------------- 1 | 19/10 10:27:18 - INFO - ##################################################################################################################################################################################################################################################################### 2 | 19/10 10:27:18 - INFO - Optimal Flow - autoCV - Auto Model Selection w/ Cross Validation :: 2020.10.19.10.27.18 3 | 19/10 10:27:18 - INFO - ##################################################################################################################################################################################################################################################################### 4 | 19/10 10:27:18 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 19/10 10:27:18 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 19/10 10:27:18 - INFO - ------------------------------------------------------------ 7 | 19/10 10:27:18 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 19/10 10:27:18 - INFO - Deleted file:autoCV_log_2020.10.12.21.14.00.log 9 | 19/10 10:27:18 - INFO - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | -------------------------------------------------------------------------------- /tests/paper/logs/autoFS_log_2020.10.19.10.27.17.log: -------------------------------------------------------------------------------- 1 | 19/10 10:27:17 - INFO - #################################################################################################################################################################################################################################### 2 | 19/10 10:27:17 - INFO - Optimal Flow - autoFS - Auto Feature Selection Module :: 2020.10.19.10.27.17 3 | 19/10 10:27:17 - INFO - #################################################################################################################################################################################################################################### 4 | 19/10 10:27:17 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 19/10 10:27:17 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 19/10 10:27:17 - INFO - ------------------------------------------------------------ 7 | 19/10 10:27:17 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 19/10 10:27:17 - INFO - Deleted file:autoFS_log_2020.10.12.21.13.59.log 9 | 19/10 10:27:17 - INFO - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 10 | -------------------------------------------------------------------------------- /tests/paper/logs/autoPP_log_2020.10.19.10.27.17.log: -------------------------------------------------------------------------------- 1 | 19/10 10:27:17 - INFO - ################################################################################################################################################################################################### 2 | 19/10 10:27:17 - INFO - Optimal Flow - autoCV - Auto PreProcessing :: 2020.10.19.10.27.17 3 | 19/10 10:27:17 - INFO - ################################################################################################################################################################################################### 4 | 19/10 10:27:17 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 19/10 10:27:17 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 19/10 10:27:17 - INFO - ------------------------------------------------------------ 7 | 19/10 10:27:17 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 19/10 10:27:17 - INFO - Deleted file:autoPP_log_2020.10.12.21.13.59.log 9 | 19/10 10:27:17 - INFO - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | 19/10 10:28:49 - INFO - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 11 | 19/10 10:28:49 - INFO - Current Running Dataset No. 0 : 12 | 19/10 10:28:49 - INFO - >>> winsorized_Strategy is 0 13 | 19/10 10:28:49 - INFO - >>> Scaler stragety is standard 14 | 19/10 10:28:49 - INFO - >>> Encoding strategy: [['onehot_Age_20-29', 'onehot_Age_30-39', 'onehot_Age_40-49', 'onehot_Age_50-59', 'onehot_Age_60-69', 'onehot_Age_70-79'], ['onehot_Position_1_left', 'onehot_Position_1_right'], ['onehot_Position_2_NaN', 'onehot_Position_2_central', 'onehot_Position_2_left_low', 'onehot_Position_2_left_up', 'onehot_Position_2_right_low', 'onehot_Position_2_right_up'], ['onehot_Size_1_0-4', 'onehot_Size_1_10-14', 'onehot_Size_1_15-19', 'onehot_Size_1_20-24', 'onehot_Size_1_25-29', 'onehot_Size_1_30-34', 'onehot_Size_1_35-39', 'onehot_Size_1_40-44', 'onehot_Size_1_45-49', 'onehot_Size_1_5-9', 'onehot_Size_1_50-54'], ['onehot_Size_2_0-2', 'onehot_Size_2_12-14', 'onehot_Size_2_15-17', 'onehot_Size_2_24-26', 'onehot_Size_2_3-5', 'onehot_Size_2_6-8', 'onehot_Size_2_9-11'], ['onehot_Treatment_no-recurrence-events', 'onehot_Treatment_recurrence-events'], ['onehot_Type_1_ge40', 'onehot_Type_1_lt40', 'onehot_Type_1_premeno'], ['onehot_Type_2_NaN', 'onehot_Type_2_no', 'onehot_Type_2_yes'], ['onehot_Type_3_no', 'onehot_Type_3_yes']] 15 | 19/10 10:28:49 - INFO - >>> Total columns with label column is: 54 16 | 19/10 10:28:49 - INFO - >>> Encoded Category Columns' Sparsity Score: 0.7857142857142857 17 | -------------------------------------------------------------------------------- /tests/paper/logs/autoPipe_log_2020.10.19.10.27.18.log: -------------------------------------------------------------------------------- 1 | 19/10 10:27:18 - INFO - ###################################################################################################################################################################################################### 2 | 19/10 10:27:18 - INFO - Optimal Flow - autoCV - Auto Pipe Connector :: 2020.10.19.10.27.18 3 | 19/10 10:27:18 - INFO - ###################################################################################################################################################################################################### 4 | 19/10 10:27:18 - INFO - Copyright All Reserved by Tony Dong | e-mail: tonyleidong@gmail.com 5 | 19/10 10:27:18 - INFO - Official Documentation: https://optimal-flow.readthedocs.io 6 | 19/10 10:27:18 - INFO - ------------------------------------------------------------ 7 | 19/10 10:27:18 - INFO - All previous logfiles will be deleted, when DELETE_FLAG is set to True. 8 | 19/10 10:27:18 - INFO - Deleted file:autoPipe_log_2020.10.12.21.14.00.log 9 | 19/10 10:27:18 - INFO - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 10 | -------------------------------------------------------------------------------- /tests/path_test.py: -------------------------------------------------------------------------------- 1 | import importlib.resources 2 | import json 3 | from optimalflow.utilis_func import export_parameters,reset_parameters,update_parameters 4 | 5 | # import pandas as pd 6 | # from pandas.io.json import json_normalize 7 | 8 | # with open('parameters.json','r') as data_file: 9 | # data_json = json.load(data_file) 10 | # flatten_data = pd.DataFrame(pd.json_normalize(data_json)) 11 | # flatten_data.head(3) 12 | 13 | 14 | # Demo for parameter update, export, and reset: 15 | update_parameters(mode = "cls", estimator_name = "svm", C=[0.1,0.2],kernel=["linear"]) 16 | export_parameters() 17 | reset_parameters() 18 | 19 | # data_file = open('./parameters.json','r') 20 | # para_data = json.load(data_file) 21 | # print(para_data["cls"]["lgr"]) 22 | 23 | # dict1 = para_data["cls"]["lgr"] 24 | # print (dict1) 25 | # dict1['random_state'] = 12 26 | # print (dict1) 27 | -------------------------------------------------------------------------------- /tests/pkl/ada_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/ada_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/ada_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/ada_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/bagging_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/bagging_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/cvlasso_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/cvlasso_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/gb_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/gb_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/gb_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/gb_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/hgboost_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/hgboost_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/hgboost_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/hgboost_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/huber_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/huber_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/knn_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/knn_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/lgr_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/lgr_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/lr_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/lr_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/lsvc_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/lsvc_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/mlp_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/mlp_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/mlp_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/mlp_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/nsvr_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/nsvr_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/rf_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/rf_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/rf_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/rf_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/rgcv_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/rgcv_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/rgcv_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/rgcv_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/sgd_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/sgd_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/sgd_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/sgd_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/svm_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/svm_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/svm_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/svm_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/tree_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/tree_reg_model.pkl -------------------------------------------------------------------------------- /tests/pkl/xgb_clf_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/xgb_clf_model.pkl -------------------------------------------------------------------------------- /tests/pkl/xgb_reg_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/pkl/xgb_reg_model.pkl -------------------------------------------------------------------------------- /tests/webapp/draft.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "language_info": { 4 | "codemirror_mode": { 5 | "name": "ipython", 6 | "version": 3 7 | }, 8 | "file_extension": ".py", 9 | "mimetype": "text/x-python", 10 | "name": "python", 11 | "nbconvert_exporter": "python", 12 | "pygments_lexer": "ipython3", 13 | "version": "3.8.4-final" 14 | }, 15 | "orig_nbformat": 2, 16 | "kernelspec": { 17 | "name": "python_defaultSpec_1601306028578", 18 | "display_name": "Python 3.8.4 64-bit" 19 | } 20 | }, 21 | "nbformat": 4, 22 | "nbformat_minor": 2, 23 | "cells": [ 24 | { 25 | "cell_type": "code", 26 | "execution_count": 27, 27 | "metadata": {}, 28 | "outputs": [ 29 | { 30 | "output_type": "execute_result", 31 | "data": { 32 | "text/plain": "dict_keys(['hidden_layer_sizes', 'activation', 'learning_rate', 'solver'])" 33 | }, 34 | "metadata": {}, 35 | "execution_count": 27 36 | } 37 | ], 38 | "source": [ 39 | "import pandas as pd\n", 40 | "from optimalflow.utilis_func import pipeline_splitting_rule,update_parameters,reset_parameters\n", 41 | "\n", 42 | "import json\n", 43 | "import os\n", 44 | "\n", 45 | "json_path = os.path.join(os.path.dirname(\"./\"), 'settings.json')\n", 46 | "with open(json_path, encoding='utf-8') as data_file:\n", 47 | " para_data = json.load(data_file)\n", 48 | "data_file.close()\n", 49 | "\n", 50 | "reset_flag = para_data['confirm_reset']\n", 51 | "\n", 52 | "custom_space = {\n", 53 | " \"cls_mlp\":para_data['space_set']['cls']['mlp'],\n", 54 | " \"cls_lr\":para_data['space_set']['cls']['lgr'],\n", 55 | " \"cls_svm\":para_data['space_set']['cls']['svm'],\n", 56 | " \"cls_ada\":para_data['space_set']['cls']['ada'],\n", 57 | " \"cls_xgb\":para_data['space_set']['cls']['xgb']\n", 58 | "}\n", 59 | "\n", 60 | "custom_space['cls_mlp'].keys()" 61 | ] 62 | }, 63 | { 64 | "cell_type": "code", 65 | "execution_count": 28, 66 | "metadata": {}, 67 | "outputs": [], 68 | "source": [ 69 | "alg_lst = custom_space.keys()" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 33, 75 | "metadata": { 76 | "tags": [] 77 | }, 78 | "outputs": [ 79 | { 80 | "output_type": "stream", 81 | "name": "stdout", 82 | "text": "Previous Parameters are: {'hidden_layer_sizes': [10, 50, 100], 'activation': ['identity', 'relu', 'tanh', 'logistic'], 'learning_rate': ['constant', 'invscaling', 'adaptive'], 'solver': ['lbfgs', 'sgd', 'adam']}\nCurrent Parameters are updated as: {'hidden_layer_sizes': [10], 'activation': ['relu'], 'learning_rate': ['constant'], 'solver': ['sgd']}\nDone with the parameters update.\ncls_mlp cls mlp {'hidden_layer_sizes': [10], 'activation': ['relu'], 'learning_rate': ['constant'], 'solver': ['sgd']}\n" 83 | } 84 | ], 85 | "source": [ 86 | "for i in alg_lst:\n", 87 | " if custom_space[i]!={}:\n", 88 | " model_type, algo_name=i.split('_')\n", 89 | " update_parameters(mode = model_type,estimator_name=algo_name,**custom_space[i])" 90 | ] 91 | }, 92 | { 93 | "cell_type": "code", 94 | "execution_count": 34, 95 | "metadata": { 96 | "tags": [] 97 | }, 98 | "outputs": [ 99 | { 100 | "output_type": "stream", 101 | "name": "stdout", 102 | "text": "Done with the parameters reset.\n" 103 | } 104 | ], 105 | "source": [ 106 | "reset_parameters()\n", 107 | "\n", 108 | "\n", 109 | "# kwargs = custom_space['mlp']\n", 110 | "\n", 111 | "# # # update_parameters(mode = \"cls\", estimator_name = \"mlp\", hidden_layer_sizes = [10],activation=[\"relu\"],learning_rate = [\"constant\"],solver = [\"sgd\"])\n", 112 | "# update_parameters(mode = \"cls\", estimator_name = \"mlp\", **kwargs)\n" 113 | ] 114 | } 115 | ] 116 | } -------------------------------------------------------------------------------- /tests/webapp/reset_settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "confirm_reset":"no_confirm", 3 | "space_set": 4 | { 5 | "cls":{ 6 | "lgr":{ 7 | }, 8 | "svm":{ 9 | }, 10 | "mlp":{ 11 | }, 12 | "ada":{ 13 | }, 14 | "rf":{ 15 | }, 16 | "gb":{ 17 | }, 18 | "xgb":{ 19 | }, 20 | "lsvc":{ 21 | }, 22 | "sgd":{ 23 | }, 24 | "hgboost":{ 25 | }, 26 | "rgcv":{ 27 | } 28 | 29 | }, 30 | "reg":{ 31 | "lr":{ 32 | }, 33 | "knn":{ 34 | }, 35 | "svm":{ 36 | }, 37 | "mlp":{ 38 | }, 39 | "ada":{ 40 | }, 41 | "rf":{ 42 | }, 43 | "gb":{ 44 | }, 45 | "xgb":{ 46 | }, 47 | "tree":{ 48 | }, 49 | "sgd":{ 50 | }, 51 | "hgboost":{ 52 | }, 53 | "rgcv":{ 54 | }, 55 | "cvlasso":{ 56 | }, 57 | "huber":{ 58 | } 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tests/webapp/settings.json: -------------------------------------------------------------------------------- 1 | {"confirm_reset": "no_confirm", "space_set": {"cls": {"lgr": {}, "svm": {}, "mlp": {"activation": ["relu"], "hidden_layer_sizes": [10], "learning_rate": ["constant"], "solver": ["sgd"]}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "lsvc": {}, "sgd": {}, "hgboost": {}, "rgcv": {}}, "reg": {"lr": {}, "knn": {}, "svm": {}, "mlp": {}, "ada": {}, "rf": {}, "gb": {}, "xgb": {}, "tree": {}, "sgd": {}, "hgboost": {}, "rgcv": {}, "cvlasso": {}, "huber": {}}}} -------------------------------------------------------------------------------- /tests/webapp/settings_script.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | from optimalflow.utilis_func import pipeline_splitting_rule, update_parameters,reset_parameters 4 | 5 | import json 6 | import os 7 | 8 | json_path_s = os.path.join(os.path.dirname("./"), 'settings.json') 9 | with open(json_path_s, encoding='utf-8') as data_file: 10 | para_data = json.load(data_file) 11 | data_file.close() 12 | 13 | reset_flag = para_data['confirm_reset'] 14 | 15 | custom_space = { 16 | "cls_mlp":para_data['space_set']['cls']['mlp'], 17 | "cls_lr":para_data['space_set']['cls']['lgr'], 18 | "cls_svm":para_data['space_set']['cls']['svm'], 19 | "cls_ada":para_data['space_set']['cls']['ada'], 20 | "cls_xgb":para_data['space_set']['cls']['xgb'], 21 | "cls_rgcv":para_data['space_set']['cls']['rgcv'], 22 | "cls_rf":para_data['space_set']['cls']['rf'], 23 | "cls_gb":para_data['space_set']['cls']['gb'], 24 | "cls_lsvc":para_data['space_set']['cls']['lsvc'], 25 | "cls_hgboost":para_data['space_set']['cls']['hgboost'], 26 | "cls_sgd":para_data['space_set']['cls']['sgd'], 27 | "reg_lr":para_data['space_set']['reg']['lr'], 28 | "reg_svm":para_data['space_set']['reg']['svm'], 29 | "reg_mlp":para_data['space_set']['reg']['mlp'], 30 | "reg_ada":para_data['space_set']['reg']['ada'], 31 | "reg_rf":para_data['space_set']['reg']['rf'], 32 | "reg_gb":para_data['space_set']['reg']['gb'], 33 | "reg_xgb":para_data['space_set']['reg']['xgb'], 34 | "reg_tree":para_data['space_set']['reg']['tree'], 35 | "reg_hgboost":para_data['space_set']['reg']['hgboost'], 36 | "reg_rgcv":para_data['space_set']['reg']['rgcv'], 37 | "reg_cvlasso":para_data['space_set']['reg']['cvlasso'], 38 | "reg_huber":para_data['space_set']['reg']['huber'], 39 | "reg_sgd":para_data['space_set']['reg']['sgd'], 40 | "reg_knn":para_data['space_set']['reg']['knn'] 41 | } 42 | 43 | 44 | try: 45 | if(reset_flag == "reset_default"): 46 | reset_parameters() 47 | if(reset_flag == "reset_settings"): 48 | json_s = os.path.join(os.path.dirname("./"), 'reset_settings.json') 49 | with open(json_s,'r') as d_file: 50 | para = json.load(d_file) 51 | json_s = os.path.join(os.path.dirname("./"), 'settings.json') 52 | w_file = open(json_s, "w",encoding='utf-8') 53 | w_file. truncate(0) 54 | json.dump(para, w_file) 55 | w_file.close() 56 | if(reset_flag == "no_confirm"): 57 | reset_parameters() 58 | for i in custom_space.keys(): 59 | if custom_space[i]!={}: 60 | model_type, algo_name=i.split('_') 61 | update_parameters(mode = model_type,estimator_name=algo_name,**custom_space[i]) 62 | except: 63 | print("Failed to Set Up the Searching Space, will Use the Default Settings!") -------------------------------------------------------------------------------- /tests/webapp/static/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.5.2 (https://getbootstrap.com/) 3 | * Copyright 2011-2020 The Bootstrap Authors 4 | * Copyright 2011-2020 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /tests/webapp/static/css/heroic-features.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Heroic Features (https://startbootstrap.com/templates/heroic-features) 3 | * Copyright 2013-2020 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-heroic-features/blob/master/LICENSE) 5 | */ 6 | body { 7 | padding-top: 56px; 8 | } 9 | -------------------------------------------------------------------------------- /tests/webapp/static/img/OptimalFlow_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/webapp/static/img/OptimalFlow_Logo.png -------------------------------------------------------------------------------- /tests/webapp/static/img/OptimalFlow_Workflow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/webapp/static/img/OptimalFlow_Workflow.PNG -------------------------------------------------------------------------------- /tests/webapp/static/img/Profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonyleidong/OptimalFlow/8c38b2f6681ba8754f4d3aeb0785d55e8d8310ba/tests/webapp/static/img/Profile.jpg -------------------------------------------------------------------------------- /tests/webapp/static/img/no-cls-output.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | {% block body %} 6 |
7 |

Currently only support Pipeline Cluster Retrieval Diagram for Classification Problem...

8 | 9 |

You can connect with me on my LinkedIn or GitHub.

10 |
11 | 12 |
13 |
14 |

Copyright © Tony Dong 2020

15 |
16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /tests/webapp/static/js/dependent-selects.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * dependent-selects 4 | * 5 | * Show filtered options on one select field depending on another 6 | * See in action https://codepen.io/furalyon/pen/NzrXZL 7 | * 8 | * By Ramkishore Manorahan - @furalyon 9 | * 10 | * 11 | * To use: 12 | * 1. Include this script 13 | * 2. Use the markup format as shown in the example.html 14 | * 15 | * usage eg: 16 | 17 | Parent 1: 22 | 23 | Child 1: 31 | 32 | * 33 | * Note: A page can have multiple sets of this 34 | * 35 | */ 36 | 37 | 38 | var handle_dependent_selects = function($parent) { 39 | var $child = document.getElementById($parent.getAttribute('data-child-id')), 40 | $selected = $parent.options[$parent.selectedIndex], 41 | parent_val = $selected.value; 42 | 43 | for (var i=0; i<$child.options.length; i++) { 44 | var $option = $child.options[i]; 45 | if($option.value != '') { 46 | $option.setAttribute('hidden',true); 47 | } 48 | }; 49 | 50 | if(parent_val) { 51 | var child_options = $selected.getAttribute('data-child-options'), 52 | child_options_array = child_options.split('|#'); 53 | 54 | for (i=0; i<$child.options.length; i++) { 55 | var $option = $child.options[i]; 56 | if ($option.value == "") { 57 | $option.innerText = "--------"; 58 | continue; 59 | } 60 | if(child_options_array.indexOf($option.value) != -1) { 61 | $option.removeAttribute('hidden'); 62 | } 63 | }; 64 | 65 | } else { 66 | var show_text = $child.getAttribute('data-text-if-parent-empty'); 67 | if(!show_text) { 68 | show_text = 'Select ' + $parent.name; 69 | } 70 | for (i=0; i<$child.options.length; i++) { 71 | var $option = $child.options[$child.selectedIndex]; 72 | if ($option.value == "") { 73 | $option.innerText = '- ' + show_text + ' -'; 74 | break; 75 | } 76 | }; 77 | } 78 | } 79 | 80 | document.addEventListener('DOMContentLoaded', function() { 81 | var $parents = document.getElementsByClassName('dependent-selects__parent'); 82 | for (var i=0; i<$parents.length; i++) { 83 | handle_dependent_selects($parents[i]); 84 | $parents[i].addEventListener('change', function() { 85 | handle_dependent_selects(this) 86 | }) 87 | } 88 | }, false); -------------------------------------------------------------------------------- /tests/webapp/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow About Author{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

About Me

8 |

9 |

I am a healthcare & pharmaceutical data scientist and big data Analytics & AI enthusiast, living in Boston area.

10 |

In my spare time, I developed OptimalFlow library to help data scientists building optimal models in an easy way, and automate Machine Learning workflow with simple codes.

11 |

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.

12 |

You can connect with me on my LinkedIn or GitHub.

13 |
14 | 15 |
16 |
17 |

Copyright © Tony Dong 2020

18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /tests/webapp/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %} {% endblock %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 48 | 49 | 50 | {% block body %} 51 | 52 | 53 | {% endblock %} 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /tests/webapp/templates/docs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Documentation{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Documentation

9 |

Find Official OptimalFlow Manual Docs Here:

10 | 11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 |

Copyright © Tony Dong 2020

19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /tests/webapp/templates/logs.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Logs Viewer{% endblock %} 4 | 5 | {% block body %} 6 | 7 |
8 |

9 |

Logs Viewer

10 |

Quickly Check the Logs of OptimalFlow, which is Supported by autoFlow Module.

11 | 12 |
13 | 14 | 20 |
21 | 22 |

23 | 24 |

25 |
26 | 27 |
28 |
29 |

30 | 31 |

32 |
33 | 34 |
35 | {% if log_flag %} 36 | 37 | {% else %} 38 | 39 | {% endif %} 40 |
41 |
42 | 43 |
44 | 45 |

46 | 47 |

48 |
49 | 50 |
51 |
52 |

Copyright © Tony Dong 2020

53 |
54 | 55 |
56 | 57 | 58 | 59 | 60 | 61 | {% endblock %} 62 | -------------------------------------------------------------------------------- /tests/webapp/templates/nologfile.html: -------------------------------------------------------------------------------- 1 |
2 |

Select the Log File Above, and Click the Button to Review.

3 |

NOTE: The Logs Files Will Only be Available When You've Done the PCTE Workflow Step.

4 |
-------------------------------------------------------------------------------- /tests/webapp/templates/viz.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block title %} OptimalFlow Visualization{% endblock %} 4 | 5 | {% block body %} 6 |
7 |

8 |

Visualization

9 |

Quickly Generate PCTE Model Evaluation Report or Retrieval Diagram, which are Supported by autoViz Module.

10 | 11 |
12 | 13 |
14 |

You can find more use demos from Documentation or from OptimalFlow's GitHub.

15 |
16 | 17 |
18 |
19 | 20 |
21 |
22 |

Copyright © Tony Dong 2020

23 |
24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /tests/webapp/webapp.json: -------------------------------------------------------------------------------- 1 | {"autoFS": {"feature_num": "8", "model_type_fs": "cls", "algo_fs": ["kbest_f", "rfe_lr"]}, "autoPP": {"scaler": ["None", "standard"], "encode_band": "4", "low_encode": ["onehot", "label"], "high_encode": ["frequency", "mean"], "winsorizer": ["0.05", "0.1"], "sparsity": "0.46", "cols": "1000", "model_type_pp": "cls"}, "autoCV": {"model_type_cv": "cls", "method_cv": "fastClassifier", "algo_cv": ["lgr", "mlp"]}, "label_col": "diagnosis", "filename": "breast_cancer.csv"} --------------------------------------------------------------------------------