Skip to content

cjsmeele/hersenschemen

Repository files navigation

Hersenschemen

This is a collection of projects for our AI course for Computer Engineering at the HU University of Applied Sciences Utrecht.

Repository contents

K-nn classifier (Gauche Scheme) knn

A data classifier based on the K-nearest-neighbor algorithm.

K-means classifier (Gauche Scheme) kmeans

A data classifier based on the K-means clustering algorithm.

OO Neural Net (C++14) neuralnet-oo

An object-oriented implementation for a cpu-bound neural network.

Algebraic (vectorized) Neural Net (C++17) neuralnet-f

An algebraic implementation for a cpu-bound neural network.

This version makes very heavy use of matrix math, template unicorns and constexpr magic to achieve blazingly fast performance… for CPU code, anyway.

The structure of the net (encoded as matrices of weights per layer) is completely static, requiring a recompile when changes to the net’s structure are needed. In return, the compiler is able to perform very aggressive optimizations, resulting in assembly that is perfect for the data you’re going to hand it.

Another interesting (dare we say awesome?) side-effect is that, given that you use a constexpr-able activation function and manage to get compile-time random numbers, you should be able to train the network at compile time!

License

All code in this repository is, unless explicitly stated otherwise in the file itself: Copyright (c) 2017, Chris Smeele and Jan Halsema.

Unless explicitly stated otherwise in the file itself, all code in this repository is distributed under the GNU General Public License (GPL) version 3 or higher.

Read the file COPYING for the full license text.

Bugs & Questions

If you have any questions or bug reports, please report them on the issues page on Github.

Authors