Skip to content

Getting non-encoded dataset #408

@joaquinvanschoren

Description

@joaquinvanschoren

If I import, for instance, the adult dataset: https://www.openml.org/d/1590
get_data automatically encodes categorical features:

dataset = oml.datasets.get_dataset(1590) # Adult dataset
X, y, attribute_names = dataset.get_data(target=dataset.default_target_attribute, 
    return_attribute_names=True)
data = pd.DataFrame(X, columns=attribute_names)
display(data.head())

->'education' is encoded as numbers

Is there a way to get the original non-encoded features, so I can look at them with pandas?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions