diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index e6cb3513ab6520111fb63824af686f2a0a50e791..0d829ea78da11c9d7dd7c6204e9639798f413b13 100644 --- a/module3/exo3/exercice.ipynb +++ b/module3/exo3/exercice.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 97, "metadata": {}, "outputs": [], "source": [ @@ -41,7 +41,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 98, "metadata": {}, "outputs": [], "source": [ @@ -60,7 +60,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 99, "metadata": { "scrolled": true }, @@ -468,7 +468,7 @@ "[3173 rows x 2 columns]" ] }, - "execution_count": 75, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } @@ -487,7 +487,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 100, "metadata": {}, "outputs": [ { @@ -526,7 +526,7 @@ "Index: []" ] }, - "execution_count": 76, + "execution_count": 100, "metadata": {}, "output_type": "execute_result" } @@ -551,7 +551,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 101, "metadata": {}, "outputs": [], "source": [ @@ -568,7 +568,7 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 102, "metadata": { "scrolled": true }, @@ -919,7 +919,7 @@ "[3173 rows x 1 columns]" ] }, - "execution_count": 78, + "execution_count": 102, "metadata": {}, "output_type": "execute_result" } @@ -940,7 +940,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 103, "metadata": {}, "outputs": [ { @@ -998,16 +998,16 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 104, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 79, + "execution_count": 104, "metadata": {}, "output_type": "execute_result" }, @@ -1038,7 +1038,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 105, "metadata": {}, "outputs": [ { @@ -1047,7 +1047,7 @@ "31.942819190992758" ] }, - "execution_count": 10, + "execution_count": 105, "metadata": {}, "output_type": "execute_result" } @@ -1072,16 +1072,16 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 106, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 80, + "execution_count": 106, "metadata": {}, "output_type": "execute_result" }, @@ -1132,25 +1132,16 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 107, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(3173, 2)\n" - ] - } - ], + "outputs": [], "source": [ "t = [date.toordinal() for date in sorted_data.index]\n", "def transform_input(t):\n", " X = np.reshape(t, newshape=(-1, 1))\n", " X = np.concatenate([X**2, X], axis=1)\n", - " return X\n", + " return X # [nb_observations, 2]\n", "X = transform_input(t)\n", - "print(X.shape) # [nb_observations, 2]\n", "c = sorted_data['CO2']\n", "\n", "reg = LinearRegression().fit(X, c)" @@ -1165,7 +1156,7 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 108, "metadata": {}, "outputs": [ { @@ -1192,16 +1183,16 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 109, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[]" + "[]" ] }, - "execution_count": 81, + "execution_count": 109, "metadata": {}, "output_type": "execute_result" }, @@ -1237,7 +1228,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 110, "metadata": {}, "outputs": [ { @@ -1246,7 +1237,7 @@ "423.89403068381216" ] }, - "execution_count": 74, + "execution_count": 110, "metadata": {}, "output_type": "execute_result" }