@@ -56,7 +56,7 @@ def fit(self, pairs: TrainingExamples, y: LabelsLike) -> None:
56
56
"""Train on the given data."""
57
57
58
58
@abstractmethod
59
- def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float_ ]:
59
+ def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float64 ]:
60
60
"""For each of self.candidates, return our current guess [0,1] of if a match."""
61
61
62
62
@abstractmethod
@@ -92,7 +92,7 @@ def remove(self, index: int) -> None:
92
92
self ._candidates .pop (index )
93
93
self ._features = numpy .delete (self ._features , index , axis = 0 )
94
94
95
- def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float_ ]:
95
+ def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float64 ]:
96
96
if not self ._fitted :
97
97
raise ValueError ("Must call fit() before candidate_scores()" )
98
98
return self ._classifier .predict_proba (self ._features )[:, 1 ].reshape (- 1 , 1 )
@@ -103,7 +103,7 @@ class BlockLearner(Learner):
103
103
104
104
def __init__ (self ):
105
105
self .current_predicates : tuple [Predicate , ...] = ()
106
- self ._cached_scores : numpy .typing .NDArray [numpy .float_ ] | None = None
106
+ self ._cached_scores : numpy .typing .NDArray [numpy .float64 ] | None = None
107
107
self ._old_dupes : TrainingExamples = []
108
108
109
109
def fit (self , pairs : TrainingExamples , y : LabelsLike ) -> None :
@@ -121,7 +121,7 @@ def fit(self, pairs: TrainingExamples, y: LabelsLike) -> None:
121
121
self ._old_dupes = dupes
122
122
self ._fitted = True
123
123
124
- def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float_ ]:
124
+ def candidate_scores (self ) -> numpy .typing .NDArray [numpy .float64 ]:
125
125
if not self ._fitted :
126
126
raise ValueError ("Must call fit() before candidate_scores()" )
127
127
if self ._cached_scores is None :
0 commit comments