mrtnoshad / Bayes_Error_Estimator

An Optimal Estimator of Bayes Error Rate Based on Chebyshev Polynomials
6 stars 1 forks source link

Error in Colab because of TKAgg #2

Open rflameiro opened 12 months ago

rflameiro commented 12 months ago

Hello, I read "Learning to Benchmark" and found it very interesting. However, when I tried to use your code on Google Colab i found two problems.

I already created a pull request for one (replacing asscalar, which is deprecated).

The other problem is the line matplotlib.use('TKAgg'). I had to delete it manually in the .py file to get the code working. As a matter of fact, I'm not sure why you import matplotlib on both .py files, as I don't see it being called anywhere else.

Congrats for the work!

LesleyWheat commented 3 weeks ago

Hi, I was wondering how you were able to get it to run properly in Google Colab. I removed the two lines you mentioned and corrected m=int(np.asscalar(m)). Running the notebook Example.ipynb produces a result of 0.11089179780246583 rather than 0.1035097377012314 (as listed in the notebook).

rflameiro commented 3 weeks ago

make_classification() is stochastic. You will get a different number everytime unless you set therandom_state parameter

LesleyWheat commented 3 weeks ago

Thanks, I was assuming there was a seed set somewhere and now I see that there isn't in either file.