[scikit-learn] question about scikit-learn
xiongyao at pku.edu.cn
Wed May 3 08:01:49 EDT 2017
scikit-learn is really good for me to do some work using machine learning method. Here, I have two questions:
1）To do 5 fold cross-validation, when I use StratifiedKFold，I could get stratified folds that each fold contains approximately the same percentage of samples
of each target class as the complete set. And, when I use GroupKFold, it ensures that the same group is not represented in both testing and training sets.
I want to know whether there is a method to combine these two methods together?
2) When I use GridSearchCV to do parameter search, I use scoring="accuracy" as scoring function to choose the best parameters. And I find that I can only get
the accuracy score from the 5 fold cross-validation. What can I do if I want to get other scores such as sensitivity, specificity, MCC at the same time? It
means that I want to use accuracy to choose the best parameters and I want to get the scores of many scoring parameters at the same time when I do 5 fold
G301, School of Chemical Biology & Biotechnology
Peking University Shenzhen Graduate School
Shenzhen 518055, Guangdong, P.R. China
E-mail: xiongyao at pku.edu.cn or xiongy20121126 at foxmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scikit-learn