fit_model
fit_model(
model_override='auto',
force_degree=None,
bandwidth_ratio=None,
progress_callback=None,
)Fits the surrogate (mean) model, the variance model and the error distribution.
The models are always trained on all input columns, so this step does not depend on which parameters are later plotted, integrated or sliced in pod(). Results are cached, so calling pod() afterwards reuses them.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| model_override | str | One of “auto”, “polynomial” or “kriging”. | 'auto' |
| force_degree | int | None | Polynomial degree when model_override=“polynomial”. | None |
| bandwidth_ratio | float | None | Variance smoother bandwidth; None picks it by leave-one-out cross-validation. |
None |
| progress_callback | callable | None | Called as (done, total, label) while the candidate models are cross-validated (the slow first call only). |
None |
Returns
| Name | Type | Description |
|---|---|---|
| Dict | Dict[str, Any] | The selected mean model, its LaTeX equation, the variance model |
| Dict[str, Any] | (residuals and bandwidth), error distribution and Sobol indices. |
Examples
fit = study.fit_model()
print(fit["equation"], fit["sobol_indices"])