8d8d007fa2ffdf2a7f8f0a5ea596db84f942339e,lore/encoders.py,Token,transform,#Token#Any#,523
Before Change
:return: encoded Series
with timer("transform %s:" % self.name, logging.DEBUG):
results = {}
for column, values in self.tokenize(data).iteritems():
result = values.map(self.map, na_action="ignore")
result[result == 0] = self.tail_value
result[result.isnull()] = self.missing_value
results[column] = result.astype(self.dtype)
return pandas.Series(pandas.DataFrame(results).values.tolist())
def reverse_transform(self, series):
with timer("reverse_transform token %s:" % self.name, logging.DEBUG):
After Change
:return: encoded Series
transformed = super(Token, self).transform(self.tokenize(data))
return pandas.Series(transformed.values.reshape((len(data), self.sequence_length)).tolist())
def reverse_transform(self, series):
with timer("reverse_transform token %s:" % self.name, logging.DEBUG):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: instacart/lore
Commit Name: 8d8d007fa2ffdf2a7f8f0a5ea596db84f942339e
Time: 2017-12-12
Author: montanalow@users.noreply.github.com
File Name: lore/encoders.py
Class Name: Token
Method Name: transform
Project Name: EducationalTestingService/factor_analyzer
Commit Name: 2bfd6edc4c2e1c32aa39c05ad6a65576ba0f9979
Time: 2021-03-25
Author: jeremy.m.biggs@gmail.com
File Name: tests/test_factor_analyzer.py
Class Name: TestFactorAnalyzer
Method Name: test_analyze_impute_value_error
Project Name: EducationalTestingService/factor_analyzer
Commit Name: 2bfd6edc4c2e1c32aa39c05ad6a65576ba0f9979
Time: 2021-03-25
Author: jeremy.m.biggs@gmail.com
File Name: tests/test_factor_analyzer.py
Class Name: TestFactorAnalyzer
Method Name: test_analyze_rotation_value_error