with the majority of posts having no link at allwe now know that this feature alone will not make good classifier let us nevertheless try it out to get first estimation of where we are training the classifier we have to pass the feature array together with the previously defined labels to the knn learner to obtain classifierx np asarray([extract_features_from_body(textfor post_idtext in fetch_posts(if post_id in all_answers]knn neighbors kneighborsclassifier(knn fit(xyusing the standard parameterswe just fitted nn (meaning nn with to our data why nnwellwith the current state of our knowledge about the datawe really have no clue what the right should be once we have more insightwe will have better idea of how to set the value for measuring the classifier' performance we have to be clear about what we want to measure the naive but easiest way is to simply calculate the average prediction quality over the test set this will result in value between for incorrectly predicting everything and for perfect prediction accuracy can be obtained through knn score(