write_forecasting_results

tsml_eval.utils.results_writing.write_forecasting_results(predictions, labels, forecaster_name, dataset_name, file_path, full_path=True, split=None, random_seed=None, time_unit='N/A', first_line_comment=None, parameter_info='No Parameter Info', mape=-1, fit_time=-1, predict_time=-1, benchmark_time=-1, memory_usage=-1)[source]

Write the predictions for a forecasting experiment in the 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.

forecaster_namestr

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

dataset_namestr

Name of the problem the forecaster 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.

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 forecaster and dataset names is created and used to write the results file.

splitstr or None, default=None

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

random_seedint or None, default=None

Indicates what random seed was used as a random_state for the forecaster.

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.

parameter_infostr, default=”No Parameter Info”

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

mape: float, default=-1

The mean absolute percentage error of the predictions.

fit_timeint, default=-1

The time taken to fit the forecaster.

predict_timeint, default=-1

The time taken to predict the forecasting labels.

benchmark_timeint, default=-1

A benchmark time for the hardware used to scale other timings.

memory_usageint, default=-1

The memory usage of the forecaster.