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

ImportError: cannot import name 'DataGenerator' from 'data_generator' #15

Open
km5ar opened this issue Mar 19, 2023 · 2 comments
Open

Comments

@km5ar
Copy link

km5ar commented Mar 19, 2023

ImportError: cannot import name 'DataGenerator' from 'data_generator' (/Users/xxxx/opt/miniconda3/envs/py3.9/lib/python3.9/site-packages/data_generator/init.py)

Any suggestion on how to fix it?

@km5ar
Copy link
Author

km5ar commented Mar 19, 2023

image

in init file it is empty, I installed it by "!pip install data_generator" and everything looks fine

image

@Minqi824
Copy link
Owner

I sincerely apologize for my late reply. If you are referring to loading existing datasets from ADBench, please see the code shown below (The dataset needs to be downloaded first).

from adbench.datasets.data_generator import DataGenerator
# load cardio dataset w.r.t. the ratio of labeled anomalies=0.05
data_generator = DataGenerator(seed=42, dataset='6_cardio')
data = data_generator.generator(la=0.05)
print(data)

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

No branches or pull requests

2 participants