Question: hello. i ' m not getting results in my grid. Its blanks.. what am I doing wrong? 4 7 ] Knn _ nod = KveighborsClassifier
hello. im not getting results in my grid. Its blanks.. what am I doing wrong?
Knnnod KveighborsClassifier
knnparans
nneighbors' : range
knngrid GridsearchCvknnmod, knnparams, cv njobs
knngrid.fit
printBest Paraneters: knngrid.bestparans
printBest CV score: knngrid.bestscore
Best Parameters: nneighbors':
Best CV score:
C Visualizing Results
Replace the blank in line of this cell with the name of your parameter dictionary from Replace the blank in line with the name of your
GridsearchCV object from B Then execute this cell to see how the CV scores varied with respect to the hyperparameter values. Use this
graph to determine if you should rerun the previous cell with a different range of hyperparameter values.
nneighbors knnparams nneighbors"
scores knngrid.cvresultsmeantestscore'
pltfigure figsizen
pltplotnneighbors, scores
pltxlabel nneighbors'
pltylabelcv score'
pltgrid
pltshow
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
