I have performed hyper tuning grid CV search on KNN model. The actual accuracy score for my KNN was accuracy of 42.31 % without performing hyper tuning. However, after performing hyper tuning, the accuracy score has gone down to 27.97 %? I would like to know why this happened? I performed Near Miss (under sampling) to balance my dataset.

  • $\begingroup$ So you had an initial $K$ with accuracy of $42.31\%$ accuracy and have evaluated different $K$, where the best $K^{*}$ resulted in $27.97\%$ accuracy ? $\endgroup$ Sep 19 '20 at 10:53
  • $\begingroup$ We need more details. What set are these scores reported for? What's the hyperparameter grid, the default hyperparameters, the selected hyperparameters? When in your pipeline do you undersample? $\endgroup$ Sep 19 '20 at 14:05
  • $\begingroup$ Try to make sure that the default values of parms are part of your parm-values dict if that parm is in the dict. e.g. n_neighbors=5, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None $\endgroup$
    – 10xAI
    Sep 20 '20 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.