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

ch.06(Tuning hyperparameters via grid search) #71

Open
yuusukekoyano opened this issue Jun 14, 2018 · 4 comments
Open

ch.06(Tuning hyperparameters via grid search) #71

yuusukekoyano opened this issue Jun 14, 2018 · 4 comments
Labels

Comments

@yuusukekoyano
Copy link

I'm now learning machine learning using the Japanese translation of this book, and when I run this program, I always get stuck on the part using sklearn.svm.

When the program do the part"gs=gs.fit(X_train,y_train)", it always show the past two graphs infinitely. I don't know the reason, so tell me what may be the cause.

My PC's spec:
Window10, python3.6.5, scikit-learn0.19.1

@rasbt rasbt added the question label Jun 14, 2018
@rasbt
Copy link
Owner

rasbt commented Jun 14, 2018

Hi there,

with "infinitely," you mean that the graphs from the previously executed code are still shown and don't go away?

In Python, you usually need to close the plot manually if you are executing the code from the interactive Python interpreter or via a Python script (.py file). Usually, you see a window on your screen somewhere, and you can then close it by clicking on the "window close" button (I think this is similar to macOS & Linux in Windows, i.e., a small "x" button in the left or right top corner).

@yuusukekoyano
Copy link
Author

Thank you, master, for the reply, and sorry for responding late. And I'm sorry I had to tell the further detail.

I implemented the whole code in ch.06, and when doing that part, first, the program shows four graphs, actually the learning curve it showed before.
When closing any of them, then it shows another graph, also actually the validation curve.
Finally when closing it, shows the learning curve, and goes back to first: I meant this as “infinitely.”

So that is the detail. Please tell me some of what may be the cause.

@rasbt
Copy link
Owner

rasbt commented Jun 15, 2018

Hi there,

I am not sure why this is happening. My guess is that you may have run the plotting code multiple times before closing the current plot, and after you close it the previous plots show up. My guess it's not really "infinitely" but rather a certain number of times given how often you executed the code before.

Other than that, maybe try to change the backend that is used by matplotlib to create the plots. I have never used Windows 10 before, so I can't help you with the details here, but I found some Stackoverflow that might be helpful: https://stackoverflow.com/questions/40747104/set-matplotlib-backend-when-using-windows-subsystem-for-linux

@yuusukekoyano
Copy link
Author

Thank you, I'll try it.

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

No branches or pull requests

2 participants