ibnummuhammad
commited on
Commit
•
09bf35f
1
Parent(s):
8458717
Print logs
Browse files- coal-price-forecast.ipynb +41 -9
coal-price-forecast.ipynb
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
@@ -13,7 +13,7 @@
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
-
"execution_count":
|
17 |
"metadata": {},
|
18 |
"outputs": [
|
19 |
{
|
@@ -155,7 +155,7 @@
|
|
155 |
"[145 rows x 5 columns]"
|
156 |
]
|
157 |
},
|
158 |
-
"execution_count":
|
159 |
"metadata": {},
|
160 |
"output_type": "execute_result"
|
161 |
}
|
@@ -167,7 +167,44 @@
|
|
167 |
},
|
168 |
{
|
169 |
"cell_type": "code",
|
170 |
-
"execution_count":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
"metadata": {},
|
172 |
"outputs": [
|
173 |
{
|
@@ -182,11 +219,6 @@
|
|
182 |
}
|
183 |
],
|
184 |
"source": [
|
185 |
-
"x = df.newcastle\n",
|
186 |
-
"y = df.ICI_1\n",
|
187 |
-
"\n",
|
188 |
-
"slope, intercept, r, p, std_err = stats.linregress(x, y)\n",
|
189 |
-
"\n",
|
190 |
"def myfunc(x):\n",
|
191 |
" return slope * x + intercept\n",
|
192 |
"\n",
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
"metadata": {},
|
7 |
"outputs": [],
|
8 |
"source": [
|
|
|
13 |
},
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
+
"execution_count": 2,
|
17 |
"metadata": {},
|
18 |
"outputs": [
|
19 |
{
|
|
|
155 |
"[145 rows x 5 columns]"
|
156 |
]
|
157 |
},
|
158 |
+
"execution_count": 2,
|
159 |
"metadata": {},
|
160 |
"output_type": "execute_result"
|
161 |
}
|
|
|
167 |
},
|
168 |
{
|
169 |
"cell_type": "code",
|
170 |
+
"execution_count": 5,
|
171 |
+
"metadata": {},
|
172 |
+
"outputs": [],
|
173 |
+
"source": [
|
174 |
+
"x = df.newcastle\n",
|
175 |
+
"y = df.ICI_1\n",
|
176 |
+
"\n",
|
177 |
+
"slope, intercept, r, p, std_err = stats.linregress(x, y)"
|
178 |
+
]
|
179 |
+
},
|
180 |
+
{
|
181 |
+
"cell_type": "code",
|
182 |
+
"execution_count": 7,
|
183 |
+
"metadata": {},
|
184 |
+
"outputs": [
|
185 |
+
{
|
186 |
+
"name": "stdout",
|
187 |
+
"output_type": "stream",
|
188 |
+
"text": [
|
189 |
+
"slope: 0.600533935403765\n",
|
190 |
+
"intercept: 33.65381401159914\n",
|
191 |
+
"r: 0.9606500704209069\n",
|
192 |
+
"p: 1.9310655623962052e-81\n",
|
193 |
+
"std_err: 0.01452032511898455\n"
|
194 |
+
]
|
195 |
+
}
|
196 |
+
],
|
197 |
+
"source": [
|
198 |
+
"print(f\"slope: {slope}\")\n",
|
199 |
+
"print(f\"intercept: {intercept}\")\n",
|
200 |
+
"print(f\"r: {r}\")\n",
|
201 |
+
"print(f\"p: {p}\")\n",
|
202 |
+
"print(f\"std_err: {std_err}\")"
|
203 |
+
]
|
204 |
+
},
|
205 |
+
{
|
206 |
+
"cell_type": "code",
|
207 |
+
"execution_count": 8,
|
208 |
"metadata": {},
|
209 |
"outputs": [
|
210 |
{
|
|
|
219 |
}
|
220 |
],
|
221 |
"source": [
|
|
|
|
|
|
|
|
|
|
|
222 |
"def myfunc(x):\n",
|
223 |
" return slope * x + intercept\n",
|
224 |
"\n",
|