Description
PyOpenMLError: Dataset 376 not compatible, PyOpenML cannot handle string features
Steps/Code to Reproduce
1 def new_df(ds):
2 dataset = oml.datasets.get_dataset(ds)
3 X, y_true, categorical = dataset.get_data(target=dataset.default_target_attribute, return_categorical_indicator=True)
4 X, y, attribute_names = dataset.get_data(target=dataset.default_target_attribute, return_attribute_names=True)
5 halloffame = pd.DataFrame(X, columns=attribute_names)
/usr/local/anaconda/lib/python3.6/site-packages/openml-0.7.0-py3.6.egg/openml/datasets/dataset.py in get_data(self, target, include_row_id, include_ignore_attributes, return_categorical_indicator, return_attribute_names)
227 raise PyOpenMLError(
228 'Dataset %d not compatible, PyOpenML cannot handle string '
229 'features' % self.dataset_id
230 )
231
PyOpenMLError: Dataset 376 not compatible, PyOpenML cannot handle string features
Expected Results
Skip these type of errors or precheck or fix?
Actual Results
Already doing one-hot encoding see below
dataset = oml.datasets.get_dataset(ds)
X, y_true, categorical = dataset.get_data(target=dataset.default_target_attribute, return_categorical_indicator=True)
X, y, attribute_names = dataset.get_data(target=dataset.default_target_attribute, return_attribute_names=True)
halloffame = pd.DataFrame(X, columns=attribute_names)
if halloffame.isnull().values.any() == True:
imp = preprocessing.Imputer(strategy='median')
X = imp.fit_transform(X)
enc = preprocessing.OneHotEncoder(categorical_features=categorical) X = enc.fit_transform(X)
Versions
Linux-3.13.0-147-generic-x86_64-with-debian-jessie-sid
Python 3.6.2 |Anaconda custom (64-bit)| (default, Jul 20 2017, 13:51:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.13.3.10
SciPy 1.0.0.0
Scikit-Learn 0.19.0
OpenML 0.7.0
Description
PyOpenMLError: Dataset 376 not compatible, PyOpenML cannot handle string features
Steps/Code to Reproduce
/usr/local/anaconda/lib/python3.6/site-packages/openml-0.7.0-py3.6.egg/openml/datasets/dataset.py in get_data(self, target, include_row_id, include_ignore_attributes, return_categorical_indicator, return_attribute_names)
227 raise PyOpenMLError(
228 'Dataset %d not compatible, PyOpenML cannot handle string '
229 'features' % self.dataset_id
230 )
231
PyOpenMLError: Dataset 376 not compatible, PyOpenML cannot handle string features
Expected Results
Skip these type of errors or precheck or fix?
Actual Results
Already doing one-hot encoding see below
Versions
Linux-3.13.0-147-generic-x86_64-with-debian-jessie-sid
Python 3.6.2 |Anaconda custom (64-bit)| (default, Jul 20 2017, 13:51:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
NumPy 1.13.3.10
SciPy 1.0.0.0
Scikit-Learn 0.19.0
OpenML 0.7.0