[Chicago] Final KNN Program for Informatics class.

Joshua Herman zitterbewegung at gmail.com
Tue Sep 22 16:23:21 CEST 2015

Dear Lewllit,
This information about an implementation of the KNN can be found reading
the documentation. scikit-learn definitely has this feature.
Joshua Herman

On Tue, Sep 22, 2015 at 8:39 AM Lewit, Douglas <d-lewit at neiu.edu> wrote:

> Not sure how many people followed that last thread, but here's my final
> solution.  The homework states that Java should be used for the assignment,
> but the professor announced in class that students can use C++ or Python if
> they prefer.  Of those three choices, Python is for sure my favorite!
>  (Although I confess that I wouldn't mind spending some time with C++.)
> I'm attaching 1) the homework assignment, 2) the text that has to be read
> for the assignment, and finally 3) my script for solving the problem.  What
> bothers me is that my percentages of successful classification are in the
> ballpark of around 66%, sometimes less than that and occasionally more than
> that depending on which environment I use to implement the program.  I
> thought that in general the KNN algorithm is supposed to yield better
> results than that, so maybe my code isn't quite correct.  Oh well.  I know
> there are a few redundancies in my code, but after all this work I
> absolutely refuse to redo it.  I think it's worth at least a B+.
> I BELIEVE (not really sure about this) that Numpy or Scikit or some
> library like that has a builtin implementation of the KNN algorithm.  If
> anyone knows anything about that, please let me know.  I would like to
> learn more about it.
> Best,
> Douglas Lewit
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150922/e3d39f93/attachment.html>

More information about the Chicago mailing list