fitbenchmarking.utils.fitbm_result module

FitBenchmarking results object

class fitbenchmarking.utils.fitbm_result.FittingResult(controller: Controller, accuracy: float | list[float] = inf, runtimes: float | list[float] = inf, emissions: float = inf, runtime_metric: Literal['mean', 'minimum', 'maximum', 'first', 'median', 'harmonic', 'trim'] = 'mean', dataset: int | None = None)

Bases: object

Minimal definition of a class to hold results from a fitting problem test.

property first_runtime

Getting function for first_runtime attribute

Returns:

first_runtime value

Return type:

float

get_n_data_points()

Returns number of data points for the result.

Returns:

Number of data points

Return type:

Int

get_n_parameters()

Returns number of parameters for the result.

Returns:

Number of parameters

Return type:

Int

property harmonic_runtime

Getting function for harmonic_runtime attribute

Returns:

harmonic_runtime value

Return type:

float

init_blank()

Initialise a new blank version of the class with the required placeholder values not set during standard initialisation.

property maximum_runtime

Getting function for max_runtime attribute

Returns:

max_runtime value

Return type:

float

property mean_runtime

Getting function for mean_runtime attribute

Returns:

mean_runtime value

Return type:

float

property median_runtime

Getting function for meadian_runtime attribute

Returns:

median_runtime value

Return type:

float

property minimum_runtime

Getting function for min_runtime attribute

Returns:

min_runtime value

Return type:

float

modified_minimizer_name(with_software: bool = False) str

Get a minimizer name which contains jacobian and hessian information. Optionally also include the software.

Parameters:

with_software (bool, optional) – Add software to the name, defaults to False

Returns:

A name for the result combination

Return type:

str

property norm_acc

Getting function for norm_acc attribute

Returns:

normalised accuracy value

Return type:

float

property norm_emissions

Getting function for norm_emissions attribute

Returns:

normalised emissions value

Return type:

float

property norm_runtime

Getting function for norm_runtime attribute

Returns:

normalised runtime value

Return type:

float

property runtime_metric

Getting function for runtime_metric attribute

Returns:

runtime_metric value

Return type:

str

sanitised_min_name(with_software=False)

Sanitise the modified minimizer name into one which can be used as a filename.

Returns:

sanitised name

Return type:

str

property sanitised_name

Sanitise the problem name into one which can be used as a filename.

Returns:

sanitised name

Return type:

str

property trim_runtime

Getting function for trimmed_runtime attribute

Returns:

trimmed_runtime value

Return type:

float