Small fixs

parent ce6c7157
......@@ -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": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7efbd47e9fd0>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7efbd4516ac8>"
]
},
"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": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7efbd47d7160>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7efbd4373cc0>"
]
},
"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": [
"[<matplotlib.lines.Line2D at 0x7efbd4e56898>]"
"[<matplotlib.lines.Line2D at 0x7efbd4344e80>]"
]
},
"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"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment