SHARE
TWEET

Untitled

a guest Jul 18th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # KNN classifier model
  2. knn = KNeighborsClassifier()
  3.  
  4. # K-fold (k=5)
  5. scores = cross_val_score(knn, data, target, cv=5, scoring='accuracy')
  6.  
  7. # Results
  8. print("Accuracy: %0.2f (+/- %0.2f)" % (scores.mean(), scores.std() * 2))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top