Skip to content

Commit 4bf00f9

Browse files
authored
Dev (#11)
* Add Kriging mean model and update PoD pipeline Introduce Gaussian Process (Kriging) as an alternative to polynomial mean models and wire it through the PoD pipeline and UI. Changes in src/digiqual/pod.py: implement fit_robust_mean_model to evaluate both polynomial degrees and a GaussianProcessRegressor via cross-validation, expose model_type_ and model_params_ on the returned model, and update bootstrap_pod_ci to accept model_type/model_params and handle Kriging (disable optimizer during bootstrap). Changes in src/digiqual/core.py: adjust logging/messages and pass the new model_type/model_params into bootstrap_pod_ci. Changes in app/app.py: update UI metrics to display the chosen Mean Model and Error Distribution string. Tests in tests/test_pod.py updated to reflect dynamic model selection, added a Kriging-specific bootstrap test, and adjusted assertions/fixtures accordingly. Overall this enables dynamic mean-model selection (Polynomial vs Kriging) and keeps bootstrap and UI behavior consistent with the new models. * Add model-selection plot, refinement UI, and diagnostics tweaks Add targeted-sampling UI and download, introduce model-selection visualization, improve bootstrap diagnostics, and add example scripts. Key changes: - app/app.py: add handler for refinement button to call Study.refine(), store generated samples and provide a CSV download UI; add plot_model_selection render output and reorganize results layout. - app/run_app.py: fix JS filename map key to match new download id ('download_new_samples'). - src/digiqual/pod.py: attach cv_scores_ to fitted mean model, remove plot_cv flag, and add plot_model_selection() to render a normalized bias-variance bar chart + MSE table. - src/digiqual/core.py: save/show the new model_selection plot when available in SimulationStudy outputs. - src/digiqual/diagnostics.py: revise bootstrap convergence routine (use degree-2 poly, use relative std dev / CV, average+max thresholds) and update sample_sufficiency report to include thresholds and both avg/max CV metrics. - scripts/kriging_run.py: new example script generating non-linear (sigmoid) data and running a PoD analysis using SimulationStudy. - scripts/make_fake_data.py: modify fake-data generators to create deliberate gap/heteroskedastic examples and adjust filenames and sizes for testing; replace normal noise with gamma noise. - tests/test_pod.py: update imports and add a test that plot_model_selection produces a figure and that fitted model has cv_scores_. Rationale: provide a visual model-selection tool for bias-variance tradeoff, expose refinement/downloading of newly generated targeted samples in the UI, and make bootstrap convergence checks more robust to heteroskedasticity and tail behavior. Also add example scripts for Kriging and improved synthetic data for diagnostics testing.
1 parent fa6e40b commit 4bf00f9

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)