Using Enriched Category Theory to Construct the Nearest Neighbour Classification Algorithm

Matthew Pugh, Jo Grundy, Corina Cirstea, Nick Harris
12/27/2023
cs.LGmath.CT

No confident code implementation found for this paper.

Abstract

This paper is the first to construct and motivate a Machine Learning algorithm solely with Enriched Category Theory, supplementing evidence that Category Theory can provide valuable insights into the construction and explainability of Machine Learning algorithms. It is shown that a series of reasonable assumptions about a dataset lead to the construction of the Nearest Neighbours Algorithm. This construction is produced as an extension of the original dataset using profunctors in the category of Lawvere metric spaces, leading to a definition of an Enriched Nearest Neighbours Algorithm, which, consequently, also produces an enriched form of the Voronoi diagram. Further investigation of the generalisations this construction induces demonstrates how the $k$ Nearest Neighbours Algorithm may also be produced. Moreover, how the new construction allows metrics on the classification labels to inform the outputs of the Enriched Nearest Neighbour Algorithm: Enabling soft classification boundaries and dependent classifications. This paper is intended to be accessible without any knowledge of Category Theory.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{pugh2023using,
  title  = {Using Enriched Category Theory to Construct the Nearest Neighbour Classification Algorithm},
  author = {Matthew Pugh and Jo Grundy and Corina Cirstea and Nick Harris},
  year   = {2023},
  eprint = {2312.16529},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.16529v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.16529.svg)](https://codeofpaper.com/paper/2312.16529)

Discussion