write_results_to_tsml_format

tsml_eval.utils.results_writing.write_results_to_tsml_format(predictions, labels, estimator_name, dataset_name, file_path, predicted_probabilities=None, first_line_estimator_name=None, full_path=True, split=None, resample_id=None, time_unit='N/A', first_line_comment=None, second_line='No Parameter Info', third_line='N/A')[source]

Write the predictions for an experiment in the standard format used by tsml.

Parameters:
predictionsnp.array

The predicted values to write to file. Must be the same length as labels.

labelsnp.array

The actual label values written to file with the predicted values. If no label is available for a case, a NaN value should be substituted.

estimator_namestr

Name of the estimator that made the predictions. Written to file and can determine file structure if full_path is False.

dataset_namestr

Name of the problem the estimator was built on.

file_pathstr

Path to write the results file to or the directory to build the default file structure if full_path is False.

predicted_probabilitiesnp.ndarray, default=None

Estimated label probabilities. If passed, these are written after the predicted values for each case.

full_pathboolean, default=True

If True, results are written directly to the directory passed in file_path. If False, then a standard file structure using the estimator and dataset names is created and used to write the results file.

first_line_estimator_namestr or None, default=None

Alternative name for the estimator to be written to the file. If None, the estimator_name is used. Useful if full_path is False and extra information is wanted in the estimator name (i.e. and alias and class name)

splitstr or None, default=None

Either None, ‘TRAIN’ or ‘TEST’. Influences the result file name and first line of the file.

resample_idint or None, default=None

Indicates what random seed was used to resample the data or used as a random_state for the estimator.

time_unitstr, default=”N/A”

The format used for timings in the file, i.e. ‘Seconds’, ‘Milliseconds’, ‘Nanoseconds’

first_line_commentstr or None, default=None

Optional comment appended to the end of the first line, i.e. the file used to generate the results or a dictionary linking label indices to actual values.

second_linestr, default=”No Parameter Info”

Unstructured estimator dependant information, i.e. estimator parameters or values from the model build.

third_linestr, default = “N/A”

Summary performance information, what values are written depends on the task.