Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New search space def #138

Merged
merged 2 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,523 changes: 1,483 additions & 40 deletions Tutorial/1_Estimators_Overview.ipynb

Large diffs are not rendered by default.

2,460 changes: 1,726 additions & 734 deletions Tutorial/2_Search_Spaces.ipynb

Large diffs are not rendered by default.

218 changes: 110 additions & 108 deletions Tutorial/3_Feature_Set_Selector.ipynb

Large diffs are not rendered by default.

76 changes: 32 additions & 44 deletions Tutorial/4_Symbolic_Regression_and_Classification.ipynb

Large diffs are not rendered by default.

136 changes: 86 additions & 50 deletions Tutorial/5_Genetic_Feature_Selection.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Tutorial/6_GraphPipeline.ipynb

Large diffs are not rendered by default.

152 changes: 107 additions & 45 deletions Tutorial/7_dask_parallelization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,91 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluations: : 242it [02:01, 1.99it/s]\n"
"Generation: 20%|██ | 1/5 [00:01<00:07, 1.93s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.9995194086144522\n"
"Generation: 1\n",
"Best roc_auc_score score: 0.9976190476190476\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Generation: 40%|████ | 2/5 [00:04<00:06, 2.12s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generation: 2\n",
"Best roc_auc_score score: 0.9976984126984128\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Generation: 60%|██████ | 3/5 [00:09<00:07, 3.80s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generation: 3\n",
"Best roc_auc_score score: 1.0\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Generation: 80%|████████ | 4/5 [00:15<00:04, 4.46s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generation: 4\n",
"Best roc_auc_score score: 1.0\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Generation: 100%|██████████| 5/5 [00:24<00:00, 4.99s/it]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generation: 5\n",
"Best roc_auc_score score: 1.0\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/linear_model/_sag.py:350: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.0\n"
]
}
],
Expand All @@ -55,7 +132,7 @@
"\n",
"if __name__==\"__main__\":\n",
" scorer = sklearn.metrics.get_scorer('roc_auc_ovr')\n",
" X, y = sklearn.datasets.load_digits(return_X_y=True)\n",
" X, y = sklearn.datasets.load_iris(return_X_y=True)\n",
" X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(X, y, train_size=0.75, test_size=0.25)\n",
" \n",
" graph_search_space = tpot2.search_spaces.pipelines.GraphPipeline(\n",
Expand All @@ -66,15 +143,15 @@
" )\n",
"\n",
" est = tpot2.TPOTEstimator(\n",
" scorers = [\"roc_auc\"],\n",
" scorers = [\"roc_auc_ovr\"],\n",
" scorers_weights = [1],\n",
" classification = True,\n",
" cv = 5,\n",
" search_space = graph_search_space,\n",
" population_size= 10,\n",
" generations = 5,\n",
" max_eval_time_seconds = 60*5,\n",
" verbose = 2,\n",
" verbose = 3,\n",
" )\n",
" \n",
" \n",
Expand Down Expand Up @@ -105,14 +182,20 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluations: : 224it [02:00, 1.86it/s]\n"
"Generation: 100%|██████████| 5/5 [00:11<00:00, 2.24s/it]\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/decomposition/_fastica.py:595: UserWarning: n_components is too large: it will be set to 8\n",
" warnings.warn(\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/decomposition/_fastica.py:128: ConvergenceWarning: FastICA did not converge. Consider increasing tolerance or the maximum number of iterations.\n",
" warnings.warn(\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/linear_model/_sag.py:350: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.9996005895289903\n"
"1.0\n"
]
}
],
Expand All @@ -122,7 +205,7 @@
"import sklearn.datasets\n",
"import numpy as np\n",
"scorer = sklearn.metrics.get_scorer('roc_auc_ovr')\n",
"X, y = sklearn.datasets.load_digits(return_X_y=True)\n",
"X, y = sklearn.datasets.load_iris(return_X_y=True)\n",
"X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(X, y, train_size=0.75, test_size=0.25)\n",
"\n",
"\n",
Expand All @@ -134,7 +217,7 @@
" )\n",
"\n",
"est = tpot2.TPOTEstimator(\n",
" scorers = [\"roc_auc\"],\n",
" scorers = [\"roc_auc_ovr\"],\n",
" scorers_weights = [1],\n",
" classification = True,\n",
" cv = 5,\n",
Expand Down Expand Up @@ -233,23 +316,16 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluations: : 119it [02:01, 1.02s/it]\n"
"Generation: 100%|██████████| 5/5 [00:13<00:00, 2.62s/it]\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/linear_model/_sag.py:350: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.9988827327847432\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-08-23 13:49:06,747 - distributed.nanny - WARNING - Worker process still alive after 3.1999992370605472 seconds, killing\n",
"2023-08-23 13:49:06,748 - distributed.nanny - WARNING - Worker process still alive after 3.199999694824219 seconds, killing\n",
"2023-08-23 13:49:06,748 - distributed.nanny - WARNING - Worker process still alive after 3.199999694824219 seconds, killing\n"
"1.0\n"
]
}
],
Expand All @@ -263,7 +339,7 @@
"\n",
"est = tpot2.TPOTEstimator(\n",
" client = client,\n",
" scorers = [\"roc_auc\"],\n",
" scorers = [\"roc_auc_ovr\"],\n",
" scorers_weights = [1],\n",
" classification = True,\n",
" cv = 5,\n",
Expand Down Expand Up @@ -297,29 +373,23 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Evaluations: : 132it [02:00, 1.10it/s]\n"
"Generation: 100%|██████████| 5/5 [00:16<00:00, 3.33s/it]\n",
"/home/ribeirop/miniconda3/envs/tpot2env/lib/python3.10/site-packages/sklearn/linear_model/_sag.py:350: ConvergenceWarning: The max_iter was reached which means the coef_ did not converge\n",
" warnings.warn(\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.999973663151898\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2023-08-23 13:51:14,527 - distributed.nanny - WARNING - Worker process still alive after 3.199999694824219 seconds, killing\n",
"2023-08-23 13:51:14,528 - distributed.nanny - WARNING - Worker process still alive after 3.19999984741211 seconds, killing\n"
"1.0\n"
]
}
],
Expand All @@ -331,7 +401,7 @@
"import numpy as np\n",
"\n",
"scorer = sklearn.metrics.get_scorer('roc_auc_ovr')\n",
"X, y = sklearn.datasets.load_digits(return_X_y=True)\n",
"X, y = sklearn.datasets.load_iris(return_X_y=True)\n",
"X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(X, y, train_size=0.75, test_size=0.25)\n",
"\n",
"\n",
Expand All @@ -352,7 +422,7 @@
"\n",
" est = tpot2.TPOTEstimator(\n",
" client = client,\n",
" scorers = [\"roc_auc\"],\n",
" scorers = [\"roc_auc_ovr\"],\n",
" scorers_weights = [1],\n",
" classification = True,\n",
" cv = 5,\n",
Expand Down Expand Up @@ -385,17 +455,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sun Grid Engine is not installed. This example requires Sun Grid Engine to be installed.\n"
]
}
],
"outputs": [],
"source": [
"from dask.distributed import Client, LocalCluster\n",
"import sklearn\n",
Expand Down Expand Up @@ -474,7 +536,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
193 changes: 20 additions & 173 deletions Tutorial/8_SH_and_early_termination.ipynb

Large diffs are not rendered by default.

Loading
Loading