Usage of util functions
cka-14 opened this issue · comments
Hi again!
I have a problem with using utils.py functions like "calculate_label_distribution". When I used magpie.calculate_label_distribution(data_dir, filtered_by=None)
it's giving out this error: AttributeError: 'Magpie' object has no attribute 'calculate_label_distribution'
. How can I use the functions?
Thanks in advance and have a nice day!
well, they're utils
functions, so not part of the Magpie object. You need to import them from their directory and use them directly, not as a method of magpie
.
Okay got it worked with:
from magpie import utils
and
utils.calculate_label_distribution('data', filtered_by=None)
Thank you for your time!