Skip to content

Commit cd59e0a

Browse files
authored
[DOC] Added Docstring for regression forecasting (aeon-toolkit#2564)
* Added Docstring for Regression * Added Docstring for Regression * exog fix
1 parent 0117c72 commit cd59e0a

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

aeon/forecasting/_regression.py

+37-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ def _fit(self, y, exog=None):
5050
5151
Parameters
5252
----------
53-
X : Time series on which to learn a forecaster
53+
y : np.ndarray
54+
A time series on which to learn a forecaster to predict horizon ahead.
55+
exog : np.ndarray, default=None
56+
Optional exogenous time series data. Included for interface
57+
compatibility but ignored in this estimator.
5458
5559
Returns
5660
-------
@@ -74,14 +78,44 @@ def _fit(self, y, exog=None):
7478
return self
7579

7680
def _predict(self, y=None, exog=None):
77-
"""Predict values for time series X."""
81+
"""
82+
Predict the next horizon steps ahead.
83+
84+
Parameters
85+
----------
86+
y : np.ndarray, default = None
87+
A time series to predict the next horizon value for. If None,
88+
predict the next horizon value after series seen in fit.
89+
exog : np.ndarray, default=None
90+
Optional exogenous time series data. Included for interface
91+
compatibility but ignored in this estimator.
92+
93+
Returns
94+
-------
95+
np.ndarray
96+
single prediction self.horizon steps ahead of y.
97+
"""
7898
if y is None:
7999
return self.regressor_.predict(self.last_)
80100
last = y[:, -self.window :]
81101
return self.regressor_.predict(last)
82102

83103
def _forecast(self, y, exog=None):
84-
"""Forecast values for time series X.
104+
"""
105+
Forecast the next horizon steps ahead.
106+
107+
Parameters
108+
----------
109+
y : np.ndarray
110+
A time series to predict the next horizon value for.
111+
exog : np.ndarray, default=None
112+
Optional exogenous time series data. Included for interface
113+
compatibility but ignored in this estimator.
114+
115+
Returns
116+
-------
117+
np.ndarray
118+
single prediction self.horizon steps ahead of y.
85119
86120
NOTE: deal with horizons
87121
"""

0 commit comments

Comments
 (0)