From 226c49e3770e2e0368a08c7ca8b9cfbff2580188 Mon Sep 17 00:00:00 2001 From: TheophilePACE Date: Tue, 22 Jan 2019 23:45:57 +0100 Subject: [PATCH] regression prete --- TP/TP3_mercredi/TP_Regression.ipynb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/TP/TP3_mercredi/TP_Regression.ipynb b/TP/TP3_mercredi/TP_Regression.ipynb index 069edba..e0247e9 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", -- 2.22.2