autoprognosis.plugins.uncertainty.plugin_cohort_explainer module
- class CohortExplainerPlugin(model: Any, task_type: str = 'classification', random_seed: int = 0, effect_size: float = 0.5)
Bases:
UncertaintyPluginUncertainty plugin based on Conformal Prediction and cohort analysis.
- Parameters:
model – model. The model to explain.
task_type – str risk_estimation, regression, classification.
random_seed – int Random seed
effect_size – float Effect size for the risk effect size explainer.
- fit(*args: Any, **kwargs: Any) UncertaintyPlugin
- static name() str
- predict(*args: Any, **kwargs: Any) DataFrame
- predict_proba(*args: Any, **kwargs: Any) DataFrame
- static type() str
- class CohortMgmt(cohort_rules: Dict[str, CohortRule])
Bases:
object- diagnostics(X: DataFrame, prediction: DataFrame, cohort_limit: int = 2) dict
- diagnostics_df(X: DataFrame, prediction: DataFrame) dict
- diagnostics_headers() list
- get(name: str) CohortRule | None
- global_cohort = '(*)'
- match(X: DataFrame) CohortRule | None
- match_all(X: DataFrame) List[CohortRule]
- class CohortRule(name: str, target_features: list = [], ops: list = [], thresholds: list = [])
Bases:
object- calibrate(ground_truth: ndarray, predictions: ndarray) bool
- get_confidence(prediction: ndarray) ndarray
- get_difficulty() float
- match(X: DataFrame) DataFrame
- merge(other: CohortRule) CohortRule
- plugin
alias of
CohortExplainerPlugin