1212from modAL .utils .data import modALinput
1313from modAL .utils .selection import multi_argmax
1414
15- from modAL .models import BaseCommittee
1615
17-
18- def vote_entropy (committee : BaseCommittee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
16+ def vote_entropy (committee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
1917 """
2018 Calculates the vote entropy for the Committee. First it computes the predictions of X for each learner in the
2119 Committee, then calculates the probability distribution of the votes. The entropy of this distribution is the vote
@@ -49,7 +47,7 @@ def vote_entropy(committee: BaseCommittee, X: modALinput, **predict_proba_kwargs
4947 return entr
5048
5149
52- def consensus_entropy (committee : BaseCommittee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
50+ def consensus_entropy (committee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
5351 """
5452 Calculates the consensus entropy for the Committee. First it computes the class probabilties of X for each learner
5553 in the Committee, then calculates the consensus probability distribution by averaging the individual class
@@ -73,7 +71,7 @@ def consensus_entropy(committee: BaseCommittee, X: modALinput, **predict_proba_k
7371 return entr
7472
7573
76- def KL_max_disagreement (committee : BaseCommittee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
74+ def KL_max_disagreement (committee , X : modALinput , ** predict_proba_kwargs ) -> np .ndarray :
7775 """
7876 Calculates the max disagreement for the Committee. First it computes the class probabilties of X for each learner in
7977 the Committee, then calculates the consensus probability distribution by averaging the individual class
@@ -103,7 +101,7 @@ def KL_max_disagreement(committee: BaseCommittee, X: modALinput, **predict_proba
103101 return np .max (learner_KL_div , axis = 1 )
104102
105103
106- def vote_entropy_sampling (committee : BaseCommittee , X : modALinput ,
104+ def vote_entropy_sampling (committee , X : modALinput ,
107105 n_instances : int = 1 ,** disagreement_measure_kwargs ) -> Tuple [np .ndarray , modALinput ]:
108106 """
109107 Vote entropy sampling strategy.
@@ -123,7 +121,7 @@ def vote_entropy_sampling(committee: BaseCommittee, X: modALinput,
123121 return query_idx , X [query_idx ]
124122
125123
126- def consensus_entropy_sampling (committee : BaseCommittee , X : modALinput ,
124+ def consensus_entropy_sampling (committee , X : modALinput ,
127125 n_instances : int = 1 ,** disagreement_measure_kwargs ) -> Tuple [np .ndarray , modALinput ]:
128126 """
129127 Consensus entropy sampling strategy.
@@ -143,7 +141,7 @@ def consensus_entropy_sampling(committee: BaseCommittee, X: modALinput,
143141 return query_idx , X [query_idx ]
144142
145143
146- def max_disagreement_sampling (committee : BaseCommittee , X : modALinput ,
144+ def max_disagreement_sampling (committee , X : modALinput ,
147145 n_instances : int = 1 ,** disagreement_measure_kwargs ) -> Tuple [np .ndarray , modALinput ]:
148146 """
149147 Maximum disagreement sampling strategy.
0 commit comments