670b85c9e9cec05210e8596bc1fb9ca66787162f,sklearn/compose/_column_transformer.py,ColumnTransformer,get_feature_names,#ColumnTransformer#,345
Before Change
if trans == "drop" or (
hasattr(column, "__len__") and not len(column)):
continue
elif trans == "passthrough":
raise NotImplementedError(
"get_feature_names is not yet supported when using "
"a "passthrough" transformer.")
After Change
hasattr(column, "__len__") and not len(column)):
continue
if trans == "passthrough":
if hasattr(self, "_df_columns"):
if ((not isinstance(column, slice))
and all(isinstance(col, str) for col in column)):
feature_names.extend(column)
else:
feature_names.extend(self._df_columns[column])
else:
indices = np.arange(self._n_features)
feature_names.extend(["x%d" % i for i in indices[column]])
continue
if not hasattr(trans, "get_feature_names"):
raise AttributeError("Transformer %s (type %s) does not "
"provide get_feature_names."
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances Project Name: scikit-learn/scikit-learn
Commit Name: 670b85c9e9cec05210e8596bc1fb9ca66787162f
Time: 2020-04-19
Author: 50599110+lrjball@users.noreply.github.com
File Name: sklearn/compose/_column_transformer.py
Class Name: ColumnTransformer
Method Name: get_feature_names
Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__
Project Name: scikit-learn/scikit-learn
Commit Name: 670b85c9e9cec05210e8596bc1fb9ca66787162f
Time: 2020-04-19
Author: 50599110+lrjball@users.noreply.github.com
File Name: sklearn/compose/_column_transformer.py
Class Name: ColumnTransformer
Method Name: get_feature_names
Project Name: apache/incubator-mxnet
Commit Name: dd44c0c3bc168b3e88cda22c443283894fd24c54
Time: 2020-09-21
Author: lausen@amazon.com
File Name: python/mxnet/symbol/numpy/_symbol.py
Class Name: _Symbol
Method Name: __getitem__