This repo, as well as the associated cli app VHamNN, have been superseded by the repo VHamML.
A machine learning (ML) library for classification using a nearest neighbor algorithm based on Hamming distances. hamnn documentation
There is an associated Command Line Interface app, VHamNN, which facilitates using the hamnn library.
You can use the library with your own datasets, or with a selection of publicly available datasets that are widely used for demonstrating and testing ML classifiers, in the datasets
directory. These files are either in ARFF (Attribute-Relation File Format) or in Orange file format.
Classification accuracy with datasets in the datasets
directory:
See this table
Do we really need another ML library? Read this!
And have a look here for a more complete description and potential use cases.
This assumes you already have V installed on your system. If not, please refer to the VHamNN readme for instructions on installing V.
v install holder66.hamnn
And (optionally) libraries used by HamNN for generating plots and for colored output on the console:
v install vsl
v install Mewzax.chalk
In your V code:
import holder66.hamnn
Example source code:
module main
import hamnn
import os
fn main() {
opts := hamnn.Options{
show_flag: true
}
datafile_path := os.home_dir() + '/.vmodules/holder66/hamnn/datasets/iris.tab'
println(datafile_path)
ds := hamnn.load_file(datafile_path)
result := hamnn.analyze_dataset(ds, opts)
println(result)
}
The V lang community meets on Discord
For bug reports, feature requests, etc., please raise an issue on github:
The mnist_train.tab file is too large to keep in the repository. If you wish to experiment with it, it can be downloaded by right-clicking on this link in a web browser, or downloaded via the command line:
wget http://henry.olders.ca/datasets/mnist_train.tab
The most recent version of the HamNN algorithm (2012) was written in python; one can experiment with it via a web-based interface. I’ve posted test results using this classifier with a number of publicly accessible datasets. Here are some additional test results with genomics datasets.
The process of development in its early stages is described in this essay written in 1989.
Copyright (c) 2017, 2022: Henry Olders.