Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a9b361

Browse files
committed
impleemnts kNN classifier of learning module on MNIST data
this classifier of learning module is not optimized to run on this huge MNIST data
1 parent f7bd052 commit 8a9b361

File tree

3 files changed

+249
-15
lines changed

3 files changed

+249
-15
lines changed

images/knn_plot.png

52.3 KB
Loading

learning.ipynb

Lines changed: 248 additions & 15 deletions
Large diffs are not rendered by default.

learning.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def ms_error(predictions, targets):
3131
def mean_error(predictions, targets):
3232
return mean([abs(p - t) for p, t in zip(predictions, targets)])
3333

34+
3435
def manhattan_distance(predictions, targets):
3536
return sum([abs(p - t) for p, t in zip(predictions, targets)])
3637

0 commit comments

Comments
 (0)