質問編集履歴
2
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -99,6 +99,20 @@
|
|
99
99
|
---> 24 result_predict = result.predict(sm.add_constant(df_future[x_name].values))
|
100
100
|
|
101
101
|
2 frames
|
102
|
+
/usr/local/lib/python3.9/dist-packages/statsmodels/base/model.py in predict(self, exog, transform, *args, **kwargs)
|
103
|
+
1157 exog = np.atleast_2d(exog) # needed in count model shape[1]
|
104
|
+
1158
|
105
|
+
-> 1159 predict_results = self.model.predict(self.params, exog, *args,
|
106
|
+
1160 **kwargs)
|
107
|
+
1161
|
108
|
+
|
109
|
+
/usr/local/lib/python3.9/dist-packages/statsmodels/regression/linear_model.py in predict(self, params, exog)
|
110
|
+
395 exog = self.exog
|
111
|
+
396
|
112
|
+
--> 397 return np.dot(exog, params)
|
113
|
+
398
|
114
|
+
399 def get_distribution(self, params, scale, exog=None, dist_class=None):
|
115
|
+
|
102
116
|
/usr/local/lib/python3.9/dist-packages/numpy/core/overrides.py in dot(*args, **kwargs)
|
103
117
|
|
104
118
|
ValueError: shapes (1,3) and (4,) not aligned: 3 (dim 1) != 4 (dim 0)
|
1
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -58,7 +58,8 @@
|
|
58
58
|
|
59
59
|
```
|
60
60
|
|
61
|
-
|
61
|
+
実行結果
|
62
|
+
```
|
62
63
|
OLS Regression Results
|
63
64
|
==============================================================================
|
64
65
|
Dep. Variable: price R-squared: 0.951
|