Skip to content

Commit

Permalink
Added 'Memorizer.get_feature_names_out()' and 'Recaller.get_feature_n…
Browse files Browse the repository at this point in the history
…ames_out()' methods
  • Loading branch information
vruusmann committed Jan 6, 2024
1 parent 61747e6 commit d689688
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sklearn2pmml/cross_reference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def memorize(self, X):
self.memory[name] = x.copy()
return numpy.empty(shape = (X.shape[0], 0), dtype = int)

def get_feature_names_out(self, input_features = None):
return numpy.asarray([])

def fit(self, X, y = None):
if not self.transform_only:
self.memorize(X)
Expand All @@ -121,6 +124,9 @@ def recall(self, X):
del self.memory[name]
return numpy.asarray(result).T

def get_feature_names_out(self, input_features = None):
return numpy.asarray(self.names)

def fit(self, X, y = None):
return self

Expand Down

0 comments on commit d689688

Please sign in to comment.