From 093c48f3c8ca9285e0bbd5017b3454adc927e642 Mon Sep 17 00:00:00 2001 From: cif Date: Mon, 23 Mar 2026 15:12:43 +0100 Subject: [PATCH] Updated the library --- ml4/2_5_1_Exercise.ipynb | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ml4/2_5_1_Exercise.ipynb b/ml4/2_5_1_Exercise.ipynb index 70351f9..179f941 100644 --- a/ml4/2_5_1_Exercise.ipynb +++ b/ml4/2_5_1_Exercise.ipynb @@ -187,9 +187,9 @@ "metadata": {}, "source": [ "## Comparing\n", - "Your task is to modify the previous code to canonical GA configuration from Holland (look at the lesson's slides). In addition you should consult the [DEAP API](http://deap.readthedocs.io/en/master/api/tools.html#operators).\n", + "Your task is to modify the previous code to match the canonical GA configuration from Holland (see the lesson's slides). In addition, you should consult the [DEAP API](http://deap.readthedocs.io/en/master/api/tools.html#operators).\n", "\n", - "Submit your notebook and include a modified code and a comparison of the effects of these changes. \n", + "Submit your notebook, including modified code and a comparison of the effects of these changes. \n", "\n", "Discuss your findings." ] @@ -200,12 +200,11 @@ "source": [ "## Optional. Optimizing ML hyperparameters\n", "\n", - "One of the applications of Genetic Algorithms is the optimization of ML hyperparameters. Previously, we have used GridSearch from Scikit. Using [sklearn-deap](https://github.com/rsteca/sklearn-deap), optimize the Titatic hyperparameters using both GridSearch and Genetic Algorithms. \n", + "One application of Genetic Algorithms is optimizing ML hyperparameters. Previously, we have used GridSearch from Scikit. Using [sklearn-genetic-opt](https://sklearn-genetic-opt.readthedocs.io/en/stable/tutorials/basic_usage.html), optimize the Titatic hyperparameters using both GridSearch and Genetic Algorithms. \n", "\n", - "The same exercise (using the digits dataset) can be found in this [notebook](https://github.com/rsteca/sklearn-deap/blob/master/test.ipynb).\n", - "\n", - "Since there is a problem with Scikit version 0.24, you can just comment on the different approaches.", + "The same exercise (using the digits dataset) is available in this [notebook](https://sklearn-genetic-opt.readthedocs.io/en/stable/index.html).\n", "\n", + "Since there is a problem with Scikit version 0.24, you can just comment on the different approaches.\n", "Alternatively, you can also use the library [sklearn-genetic-opt](https://sklearn-genetic-opt.readthedocs.io/en/stable/index.html) and discuss the digit classification example included in the library: [digits decision tree](https://sklearn-genetic-opt.readthedocs.io/en/stable/notebooks/Digits_decision_tree.html)." ] }, @@ -215,12 +214,12 @@ "source": [ "## Optional. Optimizing an ML pipeline with a genetic algorithm\n", "\n", - "The library [TPOT](https://epistasislab.github.io/tpot/latest/) optimizes ML pipelines and comes with a lot of [examples](https://epistasislab.github.io/tpot/latest/Tutorial/9_Genetic_Algorithm_Overview/) and even notebooks, for example for the [iris dataset](https://github.com/EpistasisLab/tpot/blob/master/tutorials/IRIS.ipynb).\n", + "The library [TPOT](https://epistasislab.github.io/tpot/latest/) optimizes ML pipelines and includes many [examples](https://epistasislab.github.io/tpot/latest/Tutorial/9_Genetic_Algorithm_Overview/) and even notebooks, such as one for the [iris dataset](https://github.com/EpistasisLab/tpot/blob/master/tutorials/IRIS.ipynb).\n", "\n", "Your task is to apply TPOT to the intermediate challenge and write a short essay explaining:\n", "* what TPOT does (with your own words).\n", - "* how you have experimented with TPOT (what you have tried and how long. Take into account that it should be run from hours to days to get good results. Read the documentation, it is not that long!).\n", - "* the results. If TPOT is rather clever or your group got better results." + "* how you have experimented with TPOT (what you have tried and how long). Take into account that it should be run from hours to days to get good results. Read the documentation, it is not that long!\n", + "* the results. If TPOT is rather clever, or your group got better results." ] }, { @@ -228,13 +227,10 @@ "metadata": {}, "source": [ "## References\n", - "* [deap](https://github.com/deap/deap)\n", - "* [sklearn-deap](https://github.com/rsteca/sklearn-deap)\n", + "* [sklearn-genetic-opt](https://sklearn-genetic-opt.readthedocs.io/en/stable/index.html)\n", "* [tpot](http://epistasislab.github.io/tpot/)\n", "* [gplearn](http://gplearn.readthedocs.io/en/latest/index.html)\n", - "* [scikit-allel](https://scikit-allel.readthedocs.io/en/latest/)\n", - "* [sklearn-genetic](https://github.com/manuel-calzolari/sklearn-genetic)\n", - "* [sklearn-genetic-opt](https://sklearn-genetic-opt.readthedocs.io/en/stable/)" + "* [scikit-allel](https://scikit-allel.readthedocs.io/en/latest/)" ] }, { @@ -265,7 +261,7 @@ "window_display": false }, "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -279,7 +275,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.12.2" }, "latex_envs": { "LaTeX_envs_menu_present": true, @@ -300,5 +296,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }