gemseo.mlearning.regression.algos.pce_settings module#
Settings of the polynomial chaos expansion model.
- class CleaningOptions(max_considered_terms=100, most_significant=20, significance_factor=0.0001)[source]#
Bases:
objectThe options of the CleaningStrategy.
- Parameters:
- max_considered_terms: int = 100#
The maximum number of coefficients of the polynomial basis to be considered.
- Settings PCERegressor_Settings(*, transformer=<factory>, parameters=<factory>, input_names=(), output_names=(), probability_space=None, degree=2, discipline=None, use_quadrature=False, use_lars=False, use_cleaning=False, hyperbolic_parameter=1.0, n_quadrature_points=0, cleaning_options=None)[source]#
Bases:
BaseRegressorSettingsThe settings of the polynomial chaos expansion model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
transformer (Mapping[str, Any]) --
By default it is set to <factory>.
parameters (Mapping[str, Any]) --
By default it is set to <factory>.
input_names (Sequence[str]) --
By default it is set to ().
output_names (Sequence[str]) --
By default it is set to ().
probability_space (ParameterSpace | None)
degree (Annotated[int, Gt(gt=0)]) --
By default it is set to 2.
discipline (Discipline | None)
use_quadrature (bool) --
By default it is set to False.
use_lars (bool) --
By default it is set to False.
use_cleaning (bool) --
By default it is set to False.
hyperbolic_parameter (Annotated[float, Gt(gt=0)]) --
By default it is set to 1.0.
n_quadrature_points (Annotated[int, Ge(ge=0)]) --
By default it is set to 0.
cleaning_options (CleaningOptions | None)
- Return type:
None
- cleaning_options: CleaningOptions | None = None#
The options of the CleaningStrategy.
If
None, useDEFAULT_CLEANING_OPTIONS.
- degree: PositiveInt = 2#
The polynomial degree of the PCE.
- Constraints:
gt = 0
- discipline: Discipline | None = None#
The discipline to be sampled.
Used only when
use_quadratureisTrueanddataisNone.
- hyperbolic_parameter: PositiveFloat = 1.0#
The \(q\)-quasi norm parameter of the `hyperbolic and anisotropic enumerate function`_, defined over the interval:math:]0,1].
- Constraints:
gt = 0
- n_quadrature_points: NonNegativeInt = 0#
The total number of quadrature points.
These points are used to compute the marginal number of points by input dimension when
disciplineis notNone. If0, use \((1+P)^d\) points, where \(d\) is the dimension of the input space and \(P\) is the polynomial degree of the PCE.- Constraints:
ge = 0
- probability_space: ParameterSpace | None = None#
The random input variables using
OTDistribution.If
None,PCERegressorusesdata.misc["input_space"]wheredatais theIODatasetpassed at instantiation.
- use_cleaning: bool = False#
Whether to use the CleaningStrategy algorithm.
Otherwise, use a fixed truncation strategy (FixedStrategy).
- use_lars: bool = False#
Whether to use the LARS algorithm.
This argument is ignored when
use_quadratureisTrue.
- use_quadrature: bool = False#
Whether to estimate the coefficients of the PCE by quadrature.
If so, use the quadrature points stored in
dataor samplediscipline. Otherwise, estimate the coefficients by least-squares regression.
- model_post_init(context, /)#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) -- The BaseModel instance.
context (Any) -- The context.
- Return type:
None