[scikit-learn] question about scikit-learn
熊瑶
xiongyao at pku.edu.cn
Wed May 3 08:05:53 EDT 2017
Dear professor,
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
cross-validation.
Thank you.
熊瑶
北京大学深圳研究生院
化学生物学与生物技术学院
XIONG Yao
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...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170503/5ae2fcae/attachment.html>
More information about the scikit-learn
mailing list