peal.teachers.preclustered_teacher

Teacher that grades counterfactuals by a precomputed cluster assignment.

Teachers are PEAL’s sources of feedback: given the counterfactuals an explainer produced, they say whether each one shows a valid reason for the predictor’s decision (“true”) or a spurious one (“false”). PreclusteredTeacher needs neither a human nor an oracle model: the explainer has already clustered the counterfactuals (cluster_list) and the caller declares which cluster ids are the correct ones. It simulates feedback in CFKD/DiDAE experiments where the meaning of every cluster is known beforehand.

Classes

PreclusteredTeacher

Feedback source that labels a counterfactual by its cluster membership.