7f5f6ea3117e7b2c2ca208462a52b81a4feee52e,tests/test_encoders.py,TestEncoders,test_sum,#TestEncoders#,139
Before Change
cols = ["C1", "D", "E", "F"]
enc = encoders.SumEncoder(verbose=1, cols=cols)
X = self.create_dataset(n_rows=1000)
X_test = enc.fit_transform(X, None)
for dt in X_test.dtypes:
numeric = False
if dt == int or dt == float:
numeric = True
self.assertTrue(numeric)
After Change
cols = ["C1", "D", "E", "F"]
X = self.create_dataset(n_rows=1000)
X_t = self.create_dataset(n_rows=100)
enc = encoders.SumEncoder(verbose=1, cols=cols)
enc.fit(X, None)
self.verify_numeric(enc.transform(X_t))
enc = encoders.SumEncoder(verbose=1)
enc.fit(X, None)
self.verify_numeric(enc.transform(X_t))
enc = encoders.SumEncoder(verbose=1, drop_invariant=True)
enc.fit(X, None)
self.verify_numeric(enc.transform(X_t))
enc = encoders.SumEncoder(verbose=1, return_df=False)
enc.fit(X, None)
self.assertTrue(isinstance(enc.transform(X_t), np.ndarray))
In pattern: SUPERPATTERN
Frequency: 7
Non-data size: 29
Instances
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_sum
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_hashing
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_binary
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_helmert
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_sum
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_ordinal
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_backward_difference
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 7f5f6ea3117e7b2c2ca208462a52b81a4feee52e
Time: 2016-06-17
Author: will@predikto.com
File Name: tests/test_encoders.py
Class Name: TestEncoders
Method Name: test_polynomial