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

Add cross-validation curve for appointed parameter of param_range #80

Open
lugq1990 opened this issue Feb 8, 2018 · 2 comments
Open

Comments

@lugq1990
Copy link
Contributor

lugq1990 commented Feb 8, 2018

@reiinakano Hi, I have just found that the project of scikit-plot is really helpful for those what to do the data analysis or machine learning, and I use it much. During my working time, I find that for the parameter choosen maybe also be plot for visualization. I have writen a new method for plot the cross-validation for a appointed parameter. I want to create a new branch added the new added method. Is that ok?

@reiinakano
Copy link
Owner

Hi @lugq1990. Contributions are welcome. Do you mind posting here your proposed plot and some examples?

@lugq1990
Copy link
Contributor Author

lugq1990 commented Feb 8, 2018

Because as we use the grid-search like param choosen method, the result is based on the train set only, not on all data, so just like the cross-validation to evaluate the model, so just for those who want to choose param based on the cv, I write a function.The example code as follews. The final result is the plot image. I am wondered if you would see it.
from __future__ import absolute_import from sklearn.datasets import load_digits as load_data from sklearn.utils import shuffle import matplotlib.pyplot as plt import scikitplot as skplt from sklearn.svm import SVC X, y = load_data(return_X_y=True) X, y = shuffle(X, y) clf = SVC() param_name = 'C' param_range = [.1,10,100] skplt.estimators.plot_validation_curve(clf, X, y, param_name=param_name, param_range=param_range) plt.show()
2018-02-08_141218

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