Result
- class glotaran.project.result.Result(additional_penalty: np.ndarray | None, cost: ArrayLike, data: dict[str, xr.Dataset], free_parameter_labels: list[str], number_of_function_evaluations: int, initial_parameters: ParameterGroup, optimized_parameters: ParameterGroup, scheme: Scheme, success: bool, termination_reason: str, chi_square: float | None = None, covariance_matrix: ArrayLike | None = None, degrees_of_freedom: int | None = None, jacobian: ArrayLike | None = None, number_of_data_points: int | None = None, number_of_jacobian_evaluations: int | None = None, number_of_variables: int | None = None, optimality: float | None = None, reduced_chi_square: float | None = None, root_mean_square_error: float | None = None)[source]
Bases:
object
The result of a global analysis
Attributes Summary
The chi-square of the optimization.
Covariance matrix.
Degrees of freedom in optimization .
Modified Jacobian matrix at the solution
Number of data points .
The number of jacobian evaluations.
Number of variables in optimization
The reduced chi-square of the optimization.
The root mean square error the optimization.
A vector with the value for each additional penalty, or None
The resulting data as a dictionary of xarray.Dataset.
List of labels of the free parameters used in optimization.
The number of function evaluations.
The optimized parameters, organized in a
ParameterGroup
Indicates if the optimization was successful.
The reason (message when) the optimizer terminated
Methods Summary
Returns the result dataset for the given dataset label.
Return a new scheme from the Result object with optimized parameters.
Formats the model as a markdown text.
Saves the result to given folder.
Methods Documentation
- cost: ArrayLike
- covariance_matrix: ArrayLike | None = None
Covariance matrix.
The rows and columns are corresponding to
free_parameter_labels
.
- data: dict[str, xr.Dataset]
The resulting data as a dictionary of xarray.Dataset.
Notes
The actual content of the data depends on the actual model and can be found in the documentation for the model.
- get_dataset(dataset_label: str) xarray.core.dataset.Dataset [source]
Returns the result dataset for the given dataset label.
Warning
Deprecated use
glotaran.project.result.Result.data[dataset_label]
instead.- Parameters
dataset_label – The label of the dataset.
- get_scheme() glotaran.project.scheme.Scheme [source]
Return a new scheme from the Result object with optimized parameters.
- Returns
A new scheme with the parameters set to the optimized values. For the dataset weights the (precomputed) weights from the original scheme are used.
- Return type
- initial_parameters: ParameterGroup
- jacobian: ArrayLike | None = None
Modified Jacobian matrix at the solution
See also:
scipy.optimize.least_squares()
- markdown(with_model: bool = True, base_heading_level: int = 1) glotaran.utils.ipython.MarkdownStr [source]
Formats the model as a markdown text.
- Parameters
with_model – If True, the model will be printed with initial and optimized parameters filled in.
- property model: glotaran.model.base_model.Model
- optimized_parameters: ParameterGroup
The optimized parameters, organized in a
ParameterGroup
- save(path: str) list[str] [source]
Saves the result to given folder.
Warning
Deprecated use
save_result(result_path=result_path, result=result, format_name="legacy", allow_overwrite=True)
instead.Returns a list with paths of all saved items. The following files are saved:
result.md: The result with the model formatted as markdown text.
optimized_parameters.csv: The optimized parameter as csv file.
{dataset_label}.nc: The result data for each dataset as NetCDF file.
- Parameters
path – The path to the folder in which to save the result.
- scheme: Scheme