Scheme
- class glotaran.project.scheme.Scheme(model: Model, parameters: Parameters, data: Mapping[str, xr.Dataset], clp_link_tolerance: float = 0.0, clp_link_method: Literal['nearest', 'backward', 'forward'] = 'nearest', maximum_number_function_evaluations: int | None = None, add_svd: bool = True, ftol: float = 1e-08, gtol: float = 1e-08, xtol: float = 1e-08, optimization_method: Literal['TrustRegionReflection', 'Dogbox', 'Levenberg-Marquardt'] = 'TrustRegionReflection', result_path: str | None = None)[source]
Bases:
object
A scheme is a collection of a model, parameters and a dataset.
A scheme also holds options for optimization.
Attributes Summary
Methods Summary
Create a
Scheme
instance from the specs defined in a file.Format the
Scheme
as markdown string.Check if there are no problems with the model or the parameters.
Return a string listing all problems in the model and missing parameters.
Methods Documentation
- clp_link_method: Literal['nearest', 'backward', 'forward'] = 'nearest'
- loader(format_name: str | None = None, **kwargs: Any) Scheme
Create a
Scheme
instance from the specs defined in a file.- Parameters:
file_name (StrOrPath) – File containing the parameter specs.
format_name (str | None) – Format the file is in, if not provided it will be inferred from the file extension.
**kwargs (Any) – Additional keyword arguments passes to the
load_scheme
implementation of the project io plugin.
- Returns:
Scheme
instance created from the file.- Return type:
- markdown()[source]
Format the
Scheme
as markdown string.- Returns:
The scheme as markdown string.
- Return type:
- optimization_method: Literal['TrustRegionReflection', 'Dogbox', 'Levenberg-Marquardt'] = 'TrustRegionReflection'
- parameters: Parameters
- source_path: StrOrPath = 'scheme.yml'
- valid() bool [source]
Check if there are no problems with the model or the parameters.
- Returns:
Whether the scheme is valid.
- Return type:
- validate() MarkdownStr [source]
Return a string listing all problems in the model and missing parameters.
- Returns:
A user-friendly string containing all the problems of a model if any. Defaults to ‘Your model is valid.’ if no problems are found.
- Return type: