Skip to main content

Installation

Conditional Randomization Test (CRT) using TabPFN. This function tests whether one or more features contain predictive information about the target variable y beyond the remaining covariates. For each feature X_j, the CRT compares: Observed statistic: Mean log predictive density of y given the observed X. Null statistic: Same quantity when X_j is replaced by samples drawn from p(X_j | X_-j).
Parameters
Efficiency The predictive model p(y | X) is fit ONLY ONCE and reused across all tested features. Each feature requires fitting only the conditional model p(X_j | X_-j). Supports: • single feature testing • batch feature testing Returns

coerce_X_y_to_numpy

View source
Convert X and y to numpy arrays while preserving feature names if X is a DataFrame.
Parameters
Returns

Heuristic to determine whether a variable should be treated as categorical.
Parameters
Returns

logp_from_full_output

View source
Extract log predictive density from TabPFN ‘full’ prediction output.
Parameters
Returns

logp_from_proba

View source
Compute log p(y_true | x) from class probabilities. probs: shape (n, C) y_true: shape (n,) classes: model.classes_
Parameters

resolve_feature_index

View source
Resolve feature identifier j into integer index and optional name.
Parameters
Returns