load_and_run_classification_experiment¶
- tsml_eval.experiments.load_and_run_classification_experiment(problem_path, results_path, dataset, classifier, row_normalise=False, classifier_name=None, resample_id=0, build_train_file=False, write_attributes=False, att_max_shape=0, benchmark_time=True, overwrite=False, predefined_resample=False)[source]¶
Load a dataset and run a classification experiment.
Function to load a dataset, run a basic classification experiment for a <dataset>/<classifier>/<resample> combination, and write the results to csv file(s) at a given location.
- Parameters:
- problem_pathstr
Location of problem files, full path.
- results_pathstr
Location of where to write results. Any required directories will be created.
- datasetstr
Name of problem. Files must be <problem_path>/<dataset>/<dataset>+”_TRAIN.ts”, same for “_TEST.ts”.
- classifierBaseClassifier
Classifier to be used in the experiment.
- row_normalisebool, default=False
Whether to normalise the data rows (time series) prior to fitting and predicting.
- classifier_namestr or None, default=None
Name of classifier used in writing results. If None, the name is taken from the classifier.
- resample_idint, default=0
Seed for resampling. If set to 0, the default train/test split from file is used. Also used in output file name.
- 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 classifier can produce its own estimates, those are used instead.
- 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.
- overwritebool, default=False
If set to False, this will only build results if there is not a result file already present. If True, it will overwrite anything already there.
- predefined_resamplebool, default=False
Read a predefined resample from file instead of performing a resample. If True the file format must include the resample_id at the end of the dataset name i.e. <problem_path>/<dataset>/<dataset>+<resample_id>+”_TRAIN.ts”.