ALiPy icon indicating copy to clipboard operation
ALiPy copied to clipboard

Error in website tutorial?

Open braaannigan opened this issue 6 years ago • 2 comments

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

braaannigan avatar Nov 14 '19 10:11 braaannigan

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.

Lggggggx avatar Nov 14 '19 11:11 Lggggggx

Nice library btw

braaannigan avatar Nov 14 '19 14:11 braaannigan