diff --git a/TP/TP3_mercredi/TP_Regression.ipynb b/TP/TP3_mercredi/TP_Regression.ipynb index 069edba235c7473005f11dc868820c997d754c49..e0247e9a808d94305c9696a1305ca57a7202cd20 100644 --- a/TP/TP3_mercredi/TP_Regression.ipynb +++ b/TP/TP3_mercredi/TP_Regression.ipynb @@ -33,10 +33,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "import numpy as np \n", + "from sklearn import datasets\n", + "boston = datasets.load_boston()\n", + "X, y = boston.data, boston.target\n", + "feature_names = boston.feature_names" + ] }, { "cell_type": "markdown", @@ -104,15 +110,20 @@ "metadata": {}, "source": [ "## Arbre de régression\n", - "![](https://fr.wikipedia.org/wiki/Arbre_de_d%C3%A9cision#/media/File:Arbre_de_decision.jpg)" + "![](https://i0.wp.com/freakonometrics.hypotheses.org/files/2015/06/boosting-algo-3.gif?zoom=2&w=456&ssl=1)\n", + "\n", + "Les arbres de régression sont des modèles très puissants, qui divisent l'espace en zone où tout les points ont le même output. On trouvera dans scikit: https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "import matplotlib.gridspec as gridspec\n", + "from matplotlib import pyplot as plt" + ] }, { "cell_type": "markdown",