run_timing_experiment¶
- tsml_eval.experiments.run_timing_experiment(estimators, input_type='collection', dimension='n_timepoints', function='fit', random_state=None)[source]¶
Return the time taken to run estimator functions for randomly generated data.
Will time the function for each estimator in milliseconds, gradually increasing the size of the chosen dimension. The time taken will be stored in a dictionary.
- Parameters:
- estimatorslist
List of estimators to be evaluated.
- input_typestr, default=”collection”
Type of input data to be generated. Options are “collection” or “series”.
- dimensionstr, default=”n_timepoints”
Type of scaler to be used. Options are “n_cases”, “n_channels”, or “n_timepoints”.
“n_cases” is only valid for input_type=”collection”.
- functionstr, default=”fit”
Function to be timed. Options are “fit”, “predict”, “fit_predict”, “predict_proba”, “fit_predict_proba”, “transform”, or “fit_transform”.
For “predict”, “predict_proba” and “transform” the function will be timed after the estimator has been fitted.
- random_stateint or None, default=None
Random state to be used for data generation and estimator cloning.
- Returns:
- dict
Dictionary of timings for each estimator and data size pair.