Skip to content

String feature support #257

Closed
Closed

Description

@rkadlec

Hi, this is more a question than a bug report. I tried downloading dataset 40748 that includes sting features and I get this error:

File "/usr/local/lib/python2.7/dist-packages/openml-0.3.0-py2.7.egg/openml/datasets/dataset.py", line 197, in get_data
raise PyOpenMLError('Dataset not compatible, PyOpenML cannot handle string features')
openml.exceptions.PyOpenMLError: Dataset not compatible, PyOpenML cannot handle string features

Given that arff module that is used internally already supports string features is it planned to add support for text datasets to openml-python?

Activity

  1. mfeurer commented on May 18, 2017

    @mfeurer
    Collaborator

    Thank you very much for reporting this. Currently, we don't plan to implement this ourselves. If you want this feature in the near future, please feel free to submit a PR to the development branch

  2. joaquinvanschoren commented on May 18, 2017

    @joaquinvanschoren
    Contributor
  3. rkadlec commented on May 22, 2017

    @rkadlec
    Author

    Do you have an estimate what all has to be changed in order to support string features?

    For instance, recently I noticed that when I upload dataset with string features OpenML.org doesn't compute MD5 hash for it, therefore Weka plugin refuses to work with it.

  4. mfeurer commented on May 22, 2017

    @mfeurer
    Collaborator

    That's a good question. Basically, it is more or less a question of how to handle the data after it is loaded. Currently, data is loaded as a numpy array. I know that numpy can support strings, but can't really foresee the consequences of loading data as a numpy array. As long as data is loaded as a numpy array, it should be a matter of changing this line.

    Regarding the open issue: did you try this with the python API?

  5. amueller commented on Oct 10, 2017

    @amueller
    Contributor

    do we want to switch to just returning pandas dataframes?

  6. mfeurer commented on Oct 10, 2017

    @mfeurer
    Collaborator

    What's the advantage of returning pandas over numpy? Does pandas allow per-column data types (which I think numpy doesn't)?

  7. amueller commented on Oct 10, 2017

    @amueller
    Contributor

    @mfeurer yes. It is actually possible in numpy, but people rarely use it. Also pandas has efficient storage for strings.

  8. mfeurer commented on Oct 10, 2017

    @mfeurer
    Collaborator

    Then go ahead :) I assumed it's simply a nicer interface, but in the end it doesn't really matter whether numpy or pandas is returned.

  9. mfeurer commented on Mar 7, 2019

    @mfeurer
    Collaborator

    String feature support was added via #548 and should be explained in the development branch documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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