Giter VIP home page Giter VIP logo

nn-knn's Introduction

NN-kNN

The notebook nnknn.ipynb provides an example of how to use our code. Once you run the code once, you should understand the workflow. The code can be run on google colab or your own computer (if you copy everything to your own colab, notice there are dependencies so you need to copy the whole project, not just the ipynb).

To run the code, you need to run the file in this order:

Run the section "Setup" Run "NCA and LMNN setup", if you don't want to use NCA or LMNN, you can skip this step. Run "Data Sets", choose dataset_name, this will determine the dataset to experiment on. The code for data set preprocessing is in the folder "dataset" If your data set is a classification data set, run "Classification with NNKNN" If your data set is a regression data set, run "Regression with NNKNN" This should be the essentials.

You may run "Results Interpretation" to see how to interpret the model or results.

The section "Sanity Check" provides a standard neural network so you can compare that with NN-kNN.

Some notes:

Each data set requires more or less a different configuration of parameters. This is currently stored in a config file and handled by the line

cfg = conf_file['dataset'][dataset_name]

The current config should be relatively good, feel free to tweak it

nnknn.ipynb provides an example of the workflow. The actual code for nn-knn is in the folder "model". If you intend to build and expand your own nnknn model, you can copy the folder "model" and use the nnknn.ipynb as a guide only.

nn-knn's People

Contributors

heuzi avatar orpheusown avatar

Watchers

 avatar  avatar

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.