ntqr.r2.evaluations¶
Evaluations for binary tests (R=2).
For any finite test there is a finite set of evaluations possible. The classes in this module compute them.
- Classes:
SingleClassifierEvaluations: Class related to the evaluations for a single classifier consistent with its observed test responses.
Functions:
Misc variables:
Classes¶
Single classifier evaluations in (Q_a, Q_b, R_{b_i, a}, R_{a_i,b}) space. |
|
Evaluations logically consistent with observed responses. |
Module Contents¶
- class ntqr.r2.evaluations.SingleClassifierEvaluations(Q, single_axioms)¶
Bases:
ntqr.evaluations.SingleClassifierEvaluationsSingle classifier evaluations in (Q_a, Q_b, R_{b_i, a}, R_{a_i,b}) space.
Deprecated class.
- number_apriori_evaluations()¶
Calculate all the possible evaluations for a binary response test.
- Return type:
int
- errors_at_qs(qs, responses)¶
Return all evaluations logically consistent with responses.
In binary classification we have Q_a + Q_b = Q. Thus, we really need to specify only two of the three (Q, Q_a, Q_b). Making a choice is arbitrary and breaks the symmetry in the algebra between the two labels. Instead, we specify Q_a, and Q_b and since we have Q from the instance initialization, we do a quality check (logic check) of the equality between the three quantities.
- max_correct_at_qs(qs, responses)¶
Gives highest performing correct for each label.
Meant to save memory for alarm applications.
- all_qs()¶
Return all possible question numbers.
- _label_wrongs_(ql)¶
Return all possible incorrect given Q_l.
- class ntqr.r2.evaluations.PosteriorSingleEvaluations(tvc: ntqr.r2.datasketches.VoteCounts)¶
Evaluations logically consistent with observed responses.
- Q¶
- tvc¶
- all_possible_evaluations(classifier: int)¶
- find_k_nearest_at_prevalence(classifier: int, qa: int, point, k: int)¶
- find_k_nearest_at_prevalence_all_classifiers(qa: int, points, k: int)¶
- distances_to_target(Qa, Raa, Rbb, point)¶
- to_pspace(point)¶