Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run .get_label_meaning() for the TWOSIDES dataset #121

Closed
sbonner0 opened this issue Oct 5, 2021 · 3 comments
Closed

Unable to run .get_label_meaning() for the TWOSIDES dataset #121

sbonner0 opened this issue Oct 5, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@sbonner0
Copy link

sbonner0 commented Oct 5, 2021

Hi,

When I try to call the function .get_label_meaning() on the TWOSIDES dataset I get the following error:

python3.8/site-packages/tdc/base_dataset.py in get_label_meaning(self, output_format)
    163             dict/pd.DataFrame/np.array: when output_format is dict/df/array
    164         """
--> 165         return utils.get_label_map(self.name, self.path, self.target,
    166                                    file_format=self.file_format,
    167                                    output_format=output_format)

AttributeError: 'DDI' object has no attribute 'target'

I am trying to understand what Y represents for this dataset? I assume the ints are mappings to reported side effects but it would be great to get that clarified.

Environment:

  • OS: MacOS 11.6
  • Python version: 3.8.12
  • TDC version: 0.3.1
@kexinhuang12345
Copy link
Collaborator

kexinhuang12345 commented Oct 6, 2021

Hi, thanks for pointing it out. For now, you can get TWOSIDES side effect label by

from tdc.utils import get_label_map
get_label_map(name = 'TWOSIDES', task = 'DDI', output_format = 'df')

You can see a column named side effect name.
we will add support to it in the next release

@kexinhuang12345 kexinhuang12345 self-assigned this Oct 6, 2021
@kexinhuang12345 kexinhuang12345 added the enhancement New feature or request label Oct 6, 2021
@sbonner0
Copy link
Author

sbonner0 commented Oct 7, 2021

Thanks @kexinhuang12345!

@kexinhuang12345
Copy link
Collaborator

Hi, you can now retrieve the label map via:

from tdc.utils import get_label_map
get_label_map(name = 'TWOSIDES', task = 'DDI', name_column = 'Side Effect Name')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants