Forecaster Object Globals

  • In scalecast, it is helpful to know the following terms:

estimators

estimators

  • estimators (_estimators_ in the docs) are the models that actually forecast

  • they come from popular machine learning libraries like scikit-learn, keras, statsmodels, and others

  • here is a list of all estimators:

[1]:
from scalecast.Forecaster import _estimators_
print(*_estimators_,sep='\n')
arima
combo
elasticnet
gbt
hwes
knn
lightgbm
lstm
mlp
mlr
prophet
rf
rnn
silverkite
svr
xgboost

estimators that can be tuned

  • the following estimators can be tuned by using a process similar to the following:

from scalecast.Forecaster import Forecaster
from scalecast import GridGenerator

GridGenerator.get_example_grids()

models = ('arima','elasticnet','gbt')
f = Forecaster(y=y,current_dates=current_dates)
f.set_validation_length(6)

for m in models:
    f.set_estimator(m)
    f.tune()
    f.auto_forecast()
[2]:
from scalecast.Forecaster import _can_be_tuned_
print(*_can_be_tuned_,sep='\n')
arima
elasticnet
gbt
hwes
knn
lightgbm
mlp
mlr
prophet
rf
silverkite
svr
xgboost

estimators that cannot be tuned

[3]:
from scalecast.Forecaster import _cannot_be_tuned_
print(*_cannot_be_tuned_,sep='\n')
combo
lstm
rnn

sklearn estimators

  • all sklearn estimators accept an Xvars and normalizer argument and these can be tuned as well:

[4]:
from scalecast.Forecaster import _sklearn_estimators_
print(*_sklearn_estimators_,sep='\n')
elasticnet
gbt
knn
lightgbm
mlp
mlr
rf
svr
xgboost

metrics

  • these are all the metrics available to use for model validation

[5]:
from scalecast.Forecaster import _metrics_
print(*_metrics_,sep='\n')
r2
rmse
mape
mae

determine_best_by

  • these are all the metrics available to use for model comparison and sorting models best-to-worst

[6]:
from scalecast.Forecaster import _determine_best_by_
print(*_determine_best_by_,sep='\n')
TestSetRMSE
TestSetMAPE
TestSetMAE
TestSetR2
InSampleRMSE
InSampleMAPE
InSampleMAE
InSampleR2
ValidationMetricValue
LevelTestSetRMSE
LevelTestSetMAPE
LevelTestSetMAE
LevelTestSetR2

normalizer

  • these are all the options to scale your data before using an sklearn estimator

[7]:
from scalecast.Forecaster import _normalizer_
print(*_normalizer_,sep='\n')
minmax
normalize
scale
pt
None
[ ]: