DataCanvasIO / HyperTS

A Full-Pipeline Automated Time Series (AutoTS) Analysis Toolkit.
https://hyperts.readthedocs.io
Apache License 2.0
257 stars 27 forks source link

What dose Space Searching and Final Training do? #52

Open gzzzzzd opened 1 year ago

gzzzzzd commented 1 year ago

Hello,First of all I would like to thank you for this excellent framework. I get a question : Can I just train the model once and skip the Space Searching ? image image

zhangxjohn commented 1 year ago

Thank you for your interest in HpyerTS. If you only want to train once without performing the search, you can do it in one of two ways: 1、Set max_trials=1, final_retrain_on_wholedata=False (in make_experiment); 2、If you want to train a particular model only once (e.g., N-Beats),you can customize the search space and set max_trials=1. Such as:

from hyperts import make_experiment
from hypernets.core.search_space import Choice, Int, Real
from hyperts.framework.search_space.macro_search_space import DLForecastSearchSpace

custom_search_space = DLForecastSearchSpace(
    enable_deepar=False, 
    enable_hybirdrnn=False, 
    enable_lstnet=False, 
    enable_nbeats=True,
    nebeats_init_kwargs = {
        'nb_blocks_per_stack': 2,
        'hidden_layer_units': 32,
        ...
    }
)

experiment = make_experiment(train_data.copy(), 
                             task='forecast',
                             timestamp='TimeStamp',
                             search_space=custom_search_space,
                             max_trials=1,
                             final_retrain_on_wholedata=False) 

However, we do not recommend that final_retrain_on_wholedata=False, as this may affect performance.