run_forecasting_experiment

tsml_eval.experiments.run_forecasting_experiment(train, test, forecaster, results_path, forecaster_name=None, dataset_name='N/A', random_seed=None, attribute_file_path=None, att_max_shape=0, benchmark_time=True)[source]

Run a forecasting experiment and save the results to file.

Function to run a basic forecasting experiment for a <dataset>/<forecaster>/<resample> combination and write the results to csv file(s) at a given location.

Parameters:
trainpd.DataFrame or np.array

The series used to train the forecaster.

testpd.DataFrame or np.array

The series used to test the trained forecaster.

forecasterBaseForecaster

Regressor to be used in the experiment.

results_pathstr

Location of where to write results. Any required directories will be created.

forecaster_namestr or None, default=None

Name of forecaster used in writing results. If None, the name is taken from the forecaster.

dataset_namestr, default=”N/A”

Name of dataset.

random_seedint or None, default=None

Indicates what random seed was used as a random_state for the forecaster. Only used for the results file name.

benchmark_timebool, default=True

Whether to benchmark the hardware used with a simple function and write the results. This will typically take ~2 seconds, but is hardware dependent.