vValentine7 commited on
Commit
35b553f
·
verified ·
1 Parent(s): 35db8b4

Update BaseModel.py

Browse files
Files changed (1) hide show
  1. BaseModel.py +3 -3
BaseModel.py CHANGED
@@ -47,12 +47,12 @@ class GeoMagModel:
47
 
48
  self.model.fit(df)
49
 
50
- def forecast(self, periods=6, freq='h'):
51
  """
52
  Make a future forecast with the trained model.
53
 
54
  Args:
55
- periods (int): The number of future periods to forecast. Defaults to 6.
56
  freq (str): The frequency of the forecast ('h' for hours). Defaults to 'h'.
57
 
58
  Returns:
@@ -65,7 +65,7 @@ class GeoMagModel:
65
  forecast = self.model.predict(future_dates)
66
  return forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']]
67
 
68
- def cross_validate(self, initial='384 hours', period='12 hours', horizon='6 hours'):
69
  """
70
  Perform cross-validation on the trained Prophet model.
71
 
 
47
 
48
  self.model.fit(df)
49
 
50
+ def forecast(self, periods=1, freq='h'):
51
  """
52
  Make a future forecast with the trained model.
53
 
54
  Args:
55
+ periods (int): The number of future periods to forecast. Defaults to 1.
56
  freq (str): The frequency of the forecast ('h' for hours). Defaults to 'h'.
57
 
58
  Returns:
 
65
  forecast = self.model.predict(future_dates)
66
  return forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']]
67
 
68
+ def cross_validate(self, initial='36 hours', period='12 hours', horizon='1 hours'):
69
  """
70
  Perform cross-validation on the trained Prophet model.
71