Skip to main content

A W-k-NN implementation with PyKeOps

Project description

W-K-NN: Weighted-k-Nearest-Neighbours

A GPU implementation of the optimal [1] W-k-NN classifier based on KeOps [2]

Installation

Using pip: pip install W-k-NN

Usage

classifier file is WKNN/wknn_clf.py

from WKNN.wknn_clf import WKNNClassifier

model = WKNNClassifier().fit(X,y)
y_pred = model.predict(X_test)

Tutorial

See compare-classifiers-synth-2D.ipynb for comparing the implementation with state-of-the-art methods.
See wknn-tuto-2d.ipynb notebook for a tutorial (To Do).

References

[1] Richard J. Samworth, Optimal weighted nearest neighbour classifiers, 2012, doi:10.1214/12-AOS1049
[2] Charlier, B., Feydy, J., Glaunès, J. A., Collin, F.-D. & Durif, G. Kernel Operations on the GPU, with Autodiff, without Memory Overflows. Journal of Machine Learning Research 22, 1–6 (2021).

Author & License

Copyright UCA/CNRS/Inria
Contributor(s): Cedric Dubois 2022

This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

w_k_nn-0.0.3.tar.gz (14.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

w_k_nn-0.0.3-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file w_k_nn-0.0.3.tar.gz.

File metadata

  • Download URL: w_k_nn-0.0.3.tar.gz
  • Upload date:
  • Size: 14.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for w_k_nn-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9ef5e39a800eb0f30e3293ff64ecdd197169a662ecc57a005b771be3edc93d30
MD5 8fa4fa7dd2cdce596616bda301f979ec
BLAKE2b-256 065460373b6c9380eb8a38339b8deeb19f2749cb200cedde4690b708d237df87

See more details on using hashes here.

File details

Details for the file w_k_nn-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: w_k_nn-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for w_k_nn-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e320e1d506b44a0788ee548dff49a24ce9f58626b0eabc9bb2014fbadd803326
MD5 d97a85899a65545ea632b8597c78aa79
BLAKE2b-256 f4c541774e3ad5f9e5d527d68d6f11cbbb080f350f323ff9ba6f08065b8b61cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page