regression_cross_validation¶
- tsml_eval.experiments.regression_cross_validation(X, y, estimator, results_path, cv=None, fold_ids=None, regressor_name=None, dataset_name='', 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 using cross-validation.
- Parameters:
- Xarray-like
Feature data.
- yarray-like
Target labels.
- estimatorobject
The regressor to be evaluated.
- results_pathstr
Path to save results.
- cvobject, optional
Cross-validation strategy. If None, 10-fold cross-validation will be used.
- fold_idslist, optional
List of fold ids to run. If None, all folds will be run. row_normalise : bool, 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.
- 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.