Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cross validation sklearn

>>> clf = svm.SVC(kernel='linear', C=1)
>>> scores = cross_validation.cross_val_score(
...    clf, iris.data, iris.target, cv=5)
...
>>> scores                                              
array([ 0.96...,  1.  ...,  0.96...,  0.96...,  1.        ])
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #cross #validation #sklearn
ADD COMMENT
Topic
Name
6+4 =