GithubHelp home page GithubHelp logo

hzy / handwritten-digit-knn-cpp Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 10 KB

A simple handwritten digit classifier in KNN coded with C++ using the MNIST dataset

Makefile 2.77% C 66.68% C++ 30.56%

handwritten-digit-knn-cpp's Introduction

Handwritten-Digit-KNN-CPP

What is this

A simple handwritten digit classifier in KNN coded with C++ using the MNIST dataset.

There is no optimization on the algorithm.

Build & Run

The dataset will be downloaded while building, so you just need:

  1. Build it with make
  2. Now if there is no error, you will get a huge binary executable file (~55MB) with the dataset embedding in.
  3. Usage: ./knn K P
  4. Example: ./knn 10 3, in which the '10' is the 'K' and the '3' is the power in minkowski_distance.

Debug

Run the whole dataset while debugging is unnessary, so you can build it in debug mode:

  1. Build it with make debug
  2. Debug Usage: ./debug K P TrainImageNum TestImageNum
  3. Example: ./debug 10 3 6000 2000, in which '6000' is the number of images will be used from training dataset and '2000' is the number of images will be used from testing dataset.

License

WTFPL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.