peal.teachers.interfaces.TeacherInterface

class peal.teachers.interfaces.TeacherInterface[source]

Bases: ABC

Duck-typed base class of all teachers.

Subclasses override get_feedback; the base implementation only raises so that a mis-configured teacher fails loudly instead of silently returning nothing.

Methods

get_feedback

Return one feedback label per explanation.

abstract get_feedback(**args)[source]

Return one feedback label per explanation.

Parameters:

**args – Explainer outputs; the exact keywords depend on the teacher (typically collage_path_list, y_target_end_confidence_list, y_source_list and y_list).

Returns:

One verdict per explanation, in the order the explanations were given.

Return type:

list

Raises:

Exception – Always, in this base class: subclasses must implement the method.