load_and_run_classification_experiment#

load_and_run_classification_experiment(problem_path, results_path, dataset, classifier, resample_id=0, cls_name=None, overwrite=False, build_train=False, predefined_resample=False)[source]#

Load a dataset and run a classification experiment.

Method to run a basic experiment and write the results to files called testFold<resampleID>.csv and, if required, trainFold<resampleID>.csv.

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”.

classifierBaseClassifier

Classifier to be used in the experiment, if none is provided one is selected using cls_name using resample_id as a seed.

cls_namestr, 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.

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.

build_trainbool, 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.

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”.