@@ -36,7 +36,6 @@ def update(self, entry_id, label):
36
36
label : float
37
37
The label of the queried sample.
38
38
"""
39
- pass
40
39
41
40
def _get_scores (self ):
42
41
"""Return the score used for making query, the larger the better. Read-only.
@@ -48,7 +47,6 @@ def _get_scores(self):
48
47
(ask_id, scores): list of tuple (int, float)
49
48
The index of the next unlabeled sample to be queried and the score assigned.
50
49
"""
51
- pass
52
50
53
51
@abstractmethod
54
52
def make_query (self ):
@@ -61,7 +59,6 @@ def make_query(self):
61
59
ask_id : int
62
60
The index of the next unlabeled sample to be queried and labeled.
63
61
"""
64
- pass
65
62
66
63
67
64
class Labeler (with_metaclass (ABCMeta , object )):
@@ -84,7 +81,6 @@ def label(self, feature):
84
81
label : int
85
82
The class label of the queried feature.
86
83
"""
87
- pass
88
84
89
85
90
86
class Model (with_metaclass (ABCMeta , object )):
@@ -108,7 +104,6 @@ def train(self, dataset, *args, **kwargs):
108
104
self : object
109
105
Returns self.
110
106
"""
111
- pass
112
107
113
108
@abstractmethod
114
109
def predict (self , feature , * args , ** kwargs ):
@@ -124,7 +119,6 @@ def predict(self, feature, *args, **kwargs):
124
119
y_pred : array-like, shape (n_samples,)
125
120
The class labels for samples in the feature array.
126
121
"""
127
- pass
128
122
129
123
@abstractmethod
130
124
def score (self , testing_dataset , * args , ** kwargs ):
@@ -141,7 +135,6 @@ def score(self, testing_dataset, *args, **kwargs):
141
135
score : float
142
136
Mean accuracy of self.predict(X) wrt. y.
143
137
"""
144
- pass
145
138
146
139
147
140
class MultilabelModel (Model ):
@@ -150,7 +143,6 @@ class MultilabelModel(Model):
150
143
A Model returns a multilabel-predicting function for future samples after
151
144
trained on a training dataset.
152
145
"""
153
- pass
154
146
155
147
156
148
class ContinuousModel (Model ):
@@ -183,7 +175,6 @@ def predict_real(self, feature, *args, **kwargs):
183
175
Each entry is the confidence scores per (sample, class)
184
176
combination.
185
177
"""
186
- pass
187
178
188
179
189
180
class ProbabilisticModel (ContinuousModel ):
@@ -210,4 +201,3 @@ def predict_proba(self, feature, *args, **kwargs):
210
201
X : array-like, shape (n_samples, n_classes)
211
202
Each entry is the prabablity estimate for each class.
212
203
"""
213
- pass
0 commit comments