Skip to content

Configuration parameters

Auto-generated

This page is generated directly from the mli config dataclasses (parleml_mli.eda.EDAConfig, parleml_mli.RunSettings, parleml_mli.rules.CardinalityCaps), so every parameter, type, default, and description is read from the source version used to generate this site. Defaults in a different installed version may differ; regenerate this page after changing the dataclasses.

fit_profiler's tuning knobs are best passed as one typed ProfilingConfig — composed from small section dataclasses (ClusteringConfig, RulesConfig, ExplanationsConfig, …). The rest of mli's tunable behaviour is exposed as keyword arguments on the other entry-point functions — see the per-function parameter tables for explain, extract_rules, and compute_eda. The three dataclasses below are the standalone config records that are not part of ProfilingConfig.

EDAConfig — exploratory data analysis

Passed to compute_eda (or built field-by-field from its **kwargs). Defaults target a <30 s run on a 100k×100 frame. See the EDA guide.

Parameter Type Default Description
sample_size int | None 20000 Row cap for the working sample. None profiles the full frame.
sample_method str random How to draw the sample: "random" or "head" (first N rows). Ignored when :attr:sample_strategy is "stratified".
sample_strategy str simple Sampling strategy: "simple" (plain random / head per :attr:sample_method) or "stratified". "stratified" keys the row budget off the target so an imbalanced dataset's rare class still appears in the EDA sample (proportional allocation with a one-row-per-class floor; continuous targets are binned into deciles first). Requires a target — either y passed to :func:compute_eda, :attr:target, or an explicit :attr:stratify_column. When no label is resolvable it degrades to simple random sampling with a UserWarning.
stratify_column str | None None Column to stratify on when :attr:sample_strategy="stratified". None falls back to the resolved target column.
sample_seed int 42 Seed for the "random" sampler — fixed for reproducible runs.
target str | None None Name of the target column when it lives inside X; unlocks the target-correlation and leakage analyses.
task_type str | None None Informational hint ("classification" / "regression"). Not used for dispatch — every artifact is computed regardless.
categorical_columns list[str] | None None Explicit categorical column list. None auto-detects by dtype.
time_column str | None None Target-observation-time column. When set, drives the POST_OUTCOME_DATE leakage detector: any datetime feature whose value is later than this on a high share of rows is flagged as post-outcome leakage. See parleml_mli.eda.leakage.
overcorrelated_threshold float 0.9 \|correlation\| at or above this raises the over-correlated alert. The default matches common production practice (0.85–0.90). The HIGH_CORRELATION severity ladder scales relative to this threshold (see :func:parleml_mli.eda.alerts.make_high_correlation_alerts), so tightening or loosening the threshold keeps the CRITICAL / HIGH / MEDIUM tiers sensible.
correlations_max_categorical_distinct int 50 Skip categorical columns with more distinct levels than this from the correlation matrix (Cramér's V blows up on high cardinality).
correlation_numeric_method str pearson Numeric × numeric association method: "pearson" (linear) or "spearman" (rank / monotone). "spearman" ranks numeric columns before the kernel, so heavy-tailed / ordinal features are scored by monotone rather than linear association; Cramér's V (cat×cat) is unaffected and η² (cat×num) becomes rank-based η². Zero-variance (constant) numeric pairs are reported as NaN under either method.
correlations_enabled bool True Compute the numeric/categorical correlation matrix.
n_jobs int | None None Worker count for the parallel correlation kernels. None = all cores.
parallelize bool True Use the multi-core correlation path; set False to force single-thread.
univariate_enabled bool True Compute per-column univariate statistics.
missingness_enabled bool True Compute the missingness matrix / pattern analysis.
outliers_enabled bool True Compute per-column outlier counts (IQR + z-score).
duplicates_enabled bool True Keep the head table of duplicate rows (:attr:EDAResult.duplicates_df). The duplicate-row count on :attr:EDAResult.table and its DUPLICATES alert are computed either way.
alerts_enabled bool True Compute the consolidated data-quality alert list.
alerts_thresholds dict[str, Any] {} Override the mli-specific alert severity ladders. The mli-generated alerts (HIGH_CORRELATION, SPIKEY, SKEWED, HISTOGRAM_GAP) all bucket into CRITICAL / HIGH / MEDIUM / LOW via hard-coded cut-offs. Supply any subset of the keys below to move a cut-off without forking the code; unknown keys are ignored. Defaults shown: * high_correlation_critical_frac (0.667) — CRITICAL when \|corr\| ≥ threshold + frac × (1 − threshold). * high_correlation_high_frac (0.333) — HIGH cut-off, same formula. * spikey_high_ratio (50.0) / spikey_medium_ratio (20.0) — peak-to-mean bin-count ladder. * skewed_high (0.6) / skewed_medium (0.4) — \|robust_skewness\| ladder. * histogram_gap_high (0.30) / histogram_gap_medium (0.20) — gaps_score ladder. The detection thresholds (what makes a column fire at all) remain the dedicated overcorrelated_threshold / spikey_bin_ratio / min_skewness_to_recommend / histogram_gap_threshold fields. Profiler-owned alerts (MISSING / IMBALANCE / …) are tuned via :attr:profiling_config_overrides instead — see the EDA MkDocs alerts reference.
missingness_kwargs dict[str, Any] {'matrix_max_rows': 2000} Missingness overrides — matrix_max_rows caps the rows plotted.
outliers_kwargs dict[str, Any] {'iqr_factor': 1.5, 'zscore_threshold': 3.5} Outlier thresholds — iqr_factor (Tukey fence) and zscore_threshold (3.5 = scipy-stats "extreme" cut-off).
duplicates_kwargs dict[str, Any] {'max_head_rows': 20, 'subset': None} Duplicate-detection overrides — max_head_rows caps the head table and an optional subset of columns defines a duplicate for the head table, the count and the alert alike.
profiling_config_overrides dict[str, Any] {} data_profiling (fg-data-profiling) Settings deep-merged before invocation. May hold any value — non-JSON-clean values are str()-ified for config persistence.
profiling_minimal_mode bool False Run the profiler in its minimal (fast, fewer artifacts) mode.
histogram_bins int 30 Bins for the high-resolution numeric histogram backfilled by the distribution-enrichment helper. Replaces the profiler's 10-bin default.
distributions_enabled bool True Run the post-profiler distribution enrichment pass (robust skewness + spikey + gaps detectors).
spikey_bin_ratio float 10.0 A bin is "spikey" iff its count is ratio × mean(counts).
spikey_min_count_share float 0.2 Spikey detector also requires the peak bin to hold this much of total mass, defending against the two-bin degenerate case.
histogram_gap_threshold float 0.1 Minimum gaps_score for a column to trip the HISTOGRAM_GAP alert (a histogram-gap heuristic, not a bimodality dip test).
recommendations_enabled bool True Compute Tukey-ladder transformation recommendations.
min_skewness_to_recommend float 0.5 Skip columns whose \|robust_skewness\| is below this — already near-symmetric.
skewness_improvement_required float 0.3 Recommend a transform only if it reduces \|skew\| by at least this fraction (1 - \|new\|/\|orig\|).
bivariate_enabled bool True Compute categorical × numeric variability (ANOVA + Brown-Forsythe).
bivariate_min_group_size int 5 Per-group row threshold; pairs without at least two groups passing are skipped.
bivariate_top_n int 50 Keep at most this many (cat × num) pairs ranked by F-statistic.
bivariate_min_numeric_unique int 10 Drop auto-detected numeric columns with fewer than this many distinct non-null values from the bivariate analysis. A boxplot is meaningful only when the numeric variable has a continuous distribution. Binary / low-cardinality numerics (encoded targets, 0/1 flags, ordinal codes) auto-detect as "numeric" by dtype but degenerate to single-tick boxes — the η²-ranked heatmap is meaningless and the per-pair boxplot is visually empty. This threshold filters them out at compute time. When numeric_columns= is explicitly passed to :func:parleml_mli.eda.bivariate.compute_category_variability, the filter is bypassed and the user's choice is respected. Set to 0 / 1 to disable the auto-filter.
scatter_top_n int 12 How many over-correlated pairs the correlated-pairs figure draws. 0 draws none.
scatter_max_points int 5000 Maximum points drawn per pair in the correlated-pairs figure.
boxplot_top_n int 12 How many top (cat × num) pairs the category-boxplot figure offers. 0 offers none.
boxplot_max_outliers_per_group int 50 Cap on the outliers the category-boxplot figure draws per group.
missingness_reorder_pattern bool True Permute pattern rows / columns by the first SVD component when plotting, so co-missing blocks cluster together. Enabled by default; set False to keep the original column / row order.
pca_top_n_features int 12 Number of loading arrows the PCA biplot shows. The PCA itself is fit on all usable numeric columns; this only affects rendering.
pca_max_points int 5000 Maximum rows the PCA biplot projects (0: every sampled row).
parcoords_top_n_features int 12 Number of feature axes on the parallel-coordinates figure.
parcoords_max_points int 5000 Maximum rows the parallel-coordinates figure draws. 0 draws none.
leakage_enabled bool True Auto-invoke :func:parleml_mli.eda.leakage.detect_suspicious_features as the final step of :func:compute_eda. The result lands on :attr:EDAResult.leakage_report. Set to False for cheap EDA runs where the leakage scan is not needed.
leakage_id_cardinality_threshold float 0.95 Cardinality / row-count ratio above which a column is considered for ID_LIKENESS. Forwarded as id_cardinality_threshold to detect_suspicious_features.
leakage_target_correlation_threshold float 0.99 \|correlation\| ≥ this triggers TARGET_CORRELATION_EXTREME. Deliberately stricter than :attr:overcorrelated_threshold (default 0.90) because leakage is a stricter framing than the general "overcorrelated" alert.
leakage_binary_auc_threshold float 0.98 For a binary target, a numeric feature whose raw values alone rank the classes with max(ROC AUC, 1 − ROC AUC) ≥ this also triggers TARGET_CORRELATION_EXTREME — the monotone, non-linear leak (a model score, a bounded y + noise) whose \|correlation\| stays below :attr:leakage_target_correlation_threshold. A feature is scored only when each class has at least 30 labelled rows with a value.
leakage_near_duplicate_threshold float 0.99 Per-feature group-purity ratio that triggers NEAR_DUPLICATE_PROXY.
leakage_post_outcome_threshold float 0.5 Share of rows where a datetime feature is strictly later than :attr:time_column that triggers POST_OUTCOME_DATE.

RunSettings — profiling run record

Immutable record of how fit_profiler was invoked, stored on ProfilingResult.config. You inspect it; you don't usually construct it.

Parameter Type Default Description
classes tuple[Any, ...] () For classifiers: tuple(model.classes_). Empty for regressors. Drives every per-class fan-out (rules, archetypes, explanations) — kept on the record so callers can inspect "what OvR loop did this run perform?".
rule_engines tuple[RuleEngine, ...] () Engines requested via the run's :class:parleml_mli.RulesConfig. Empty when rule extraction was skipped.
rule_miner_kwargs dict[str, Any] {} Pass-through kwargs forwarded to every rule miner.
explanations dict[str, bool] {} {artifact: bool} map of which explanation artifacts were requested ("pdp", "fairness", "compacity", "surrogate", etc.).
ovr_classes tuple[Any, ...] | None None Subset of classes to iterate when present, else None (iterate all). Useful when only a subset of multiclass labels is interesting.
decision_threshold float | None None Resolved binary decision threshold (ProfilingResult.threshold_'s value), or None when the model's own decision applies and for multiclass / regression.
clustering dict[str, Any] {} Frozen snapshot of the resolved :class:parleml_mli.ClusteringConfig knobs actually used (space_type / min_cluster_size / shap_distance_metric / n_components / umap_sample_size / n_trials …). Enum knobs are stored by .value for stable, human-readable round-trips.
archetypes dict[str, Any] {} Frozen snapshot of the resolved :class:parleml_mli.ArchetypeConfig survival filters (min_stability / contamination_min_coverage / contamination_beta / min_odds_ratio / n_bootstrap / score_threshold).
runtime dict[str, Any] {} Frozen snapshot of the determinism / parallelism knobs (random_state / n_jobs / use_native_shap).
eda bool False Whether the EDA stage was requested for this run.
schema_version int 3 :data:SCHEMA_VERSION when the record was written.

CardinalityCaps — rule rendering caps

Display-time caps for set-membership antecedents in extract_rules output (Antecedent.to_text). Rendering only — never truncates the underlying value set.

Parameter Type Default Description
inline_limit int 15 Maximum number of category labels rendered inline. Sets larger than this collapse to "{a, b, c, ... (+N more)}".
top_k int 5 Number of category labels shown in the renderer's "top-K" sample fallback when the full inline form is too large.