Skip to content
/ kNN Public

This repository setups up a basic dry kNN (k-Nearest Neighbor). The idea is to have a structure where training data can quickly be loaded into predictions can be made.

License

Notifications You must be signed in to change notification settings

atxarib99/kNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kNN

Goals

This repository setups up a basic dry kNN (k-Nearest Neighbor). The idea is to have a structure where training data can quickly be loaded into predictions can be made.

Example

The most basic example is provided below

#import first
import knn

#setup trainer, k can be defined here
trainer = knn.knn(k=5)

#load training data
trainer.load(X,Y)

#make a prediction
guess = trainer.predict(testX)

An example with a visual representation is provided in example.py An example without a visual representation is provided in examplesimple.py An example that tunes the hyper parameter k is provided in exampletuning.py

Documentation

All documentation has been provided in docstrings. Any merge requests should have docstrings included.

About

This repository setups up a basic dry kNN (k-Nearest Neighbor). The idea is to have a structure where training data can quickly be loaded into predictions can be made.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages