Scheme
- class glotaran.project.scheme.Scheme(model: Model, parameters: ParameterGroup, data: Mapping[str, xr.Dataset], clp_link_tolerance: float = 0.0, maximum_number_function_evaluations: int | None = None, non_negative_least_squares: bool | None = None, group_tolerance: float | None = None, group: bool | 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:
objectA scheme is a collection of a model, parameters and a dataset.
A scheme also holds options for optimization.
Attributes Summary
Return the dataset model's global dimension.
Return the dataset model's model dimension.
Methods Summary
Create
Schemefrom specs in yaml file.Create a
Schemeinstance from the specs defined in a file.Format the
Schemeas markdown string.Return a list with all problems in the model and missing parameters.
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
- static from_yaml_file(filename: str) glotaran.project.scheme.Scheme[source]
Create
Schemefrom specs in yaml file.Warning
Deprecated use
glotaran.io.load_scheme(filename)instead.
- loader(format_name: str = None, **kwargs: Any) Scheme
Create a
Schemeinstance from the specs defined in a file.- Parameters
file_name (StrOrPath) – File containing the parameter specs.
format_name (str) – 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_schemeimplementation of the project io plugin.
- Returns
Schemeinstance created from the file.- Return type
- markdown()[source]
Format the
Schemeas markdown string.- Returns
The scheme as markdown string.
- Return type
- model: Model
- optimization_method: Literal['TrustRegionReflection', 'Dogbox', 'Levenberg-Marquardt'] = 'TrustRegionReflection'
- parameters: ParameterGroup
- problem_list() list[str][source]
Return a list with all problems in the model and missing 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