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

Error in website tutorial? #23

Open
braaannigan opened this issue Nov 14, 2019 · 2 comments
Open

Error in website tutorial? #23

braaannigan opened this issue Nov 14, 2019 · 2 comments

Comments

@braaannigan
Copy link

In the website tutorial at http://parnec.nuaa.edu.cn/huangsj/alipy/10_mins_to_alipy.html
there is no initial fit of the model and so I get an error when running the line:

select_ind = uncertainStrategy.select(label_ind, unlab_ind, model=model, batch_size=1)
NotFittedError: Call fit before prediction

It looks to me like you need to run

model.fit(X=X[label_ind.index, :], y=y[label_ind.index])

after the alibox.getsplit line.

Also, round is a keyword in python, so this should be replaced by something else e.g. fold

@Lggggggx
Copy link
Collaborator

Thanks for report this. The example code in the websit at http://parnec.nuaa.edu.cn/huangsj/alipy/10_mins_to_alipy.html is an old version and we haven`t update it yet. There ara a lot of example codes in ALiPy/examples/AL_settings for you to learn how alipy work.

Indeed, it is a good advice to change the round to fold.

@braaannigan
Copy link
Author

Nice library btw

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