refine

refine(
    n_points=10,
    max_gap_ratio=MAX_GAP_RATIO,
    min_r2_score=MIN_R2_SCORE,
    max_avg_cv=MAX_AVG_CV,
    max_max_cv=MAX_MAX_CV,
    max_allowed_vif=MAX_ALLOWED_VIF,
    seed=None,
)

Identifies gaps or high-variance regions and suggests new simulation points.

Parameters

Name Type Description Default
n_points int Number of new samples to suggest per detected issue. 10
max_gap_ratio float Largest allowed coverage gap, as a fraction of each input’s range. MAX_GAP_RATIO
min_r2_score float Minimum cross-validated R² for the model-fit check. MIN_R2_SCORE
max_avg_cv float Maximum average bootstrap spread (relative to the response std). MAX_AVG_CV
max_max_cv float Maximum bootstrap spread at any probe point. MAX_MAX_CV
max_allowed_vif float Maximum Variance Inflation Factor for the collinearity check. MAX_ALLOWED_VIF
seed int Seed for reproducible suggestions. None

Returns

Name Type Description
pd.DataFrame pd.DataFrame: A DataFrame of recommended new input coordinates.

Examples

# If diagnostics fail, ask for 10 new points to fix it
new_samples = study.refine(n_points=10)
print(new_samples.head())