run_regression_experiment

tsml_eval.experiments.run_regression_experiment(X_train, y_train, X_test, y_test, regressor, results_path, row_normalise=False, regressor_name=None, dataset_name='', resample_id=None, build_test_file=True, build_train_file=False, ignore_custom_train_estimate=False, attribute_file_path=None, att_max_shape=0, benchmark_time=True)[source]

Run a regression experiment and save the results to file.

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

Parameters:
X_trainpd.DataFrame or np.array

The data to train the regressor.

y_trainnp.array

Training data labels.

X_testpd.DataFrame or np.array

The data used to test the trained regressor.

y_testnp.array

Testing data labels.

regressorBaseRegressor

Regressor to be used in the experiment.

results_pathstr

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

row_normalisebool, default=False

Whether to normalise the data rows (time series) prior to fitting and predicting.

regressor_namestr or None, default=None

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

dataset_namestr, default=”N/A”

Name of dataset.

resample_idint or None, default=None

Seed for resampling. If set to 0, the default train/test split from file is used. Also used in output file name.

build_test_filebool, default=True:

Whether to generate test files or not. If the regressor can generate its own train predictions, the classifier will be built but no file will be output.

build_train_filebool, default=False

Whether to generate train files or not. If true, it performs a 10-fold cross-validation on the train data and saves. If the regressor can produce its own estimates, those are used instead.

ignore_custom_train_estimatebool, default=False

todo

attribute_file_pathstr or None, default=None

todo (only test)

att_max_shapeint, default=0

todo

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.