Software and demos

Least-Squares Anomaly Detection

Python implementation of a fast, kernel-based anomaly detection method which can process both static and time-series data.
More information, source code and demo.

Least-Squares Probabilistic Classifier

Python implementation of a fast, kernel-based classifier.
More information, source code and demo.

Simple Heart Rate Monitor Demo

A quick demonstration of measuring the heart rate using a webcam, implemented with Python and OpenCV. As oxygen levels in the blood rise and fall, its light absorbtion changes. Therefore a webcam picking up light shining through some tissue (such as a finger) is usually sensitive enough to detect those changes, giving a pulse waveform.

Requires OpenCV and numpy to run. In order to get good results, the frame rate of the camera should be set to 20-30 FPS (on Linux this can be done with guvcview). The challenge with using this in practice is to keep the finger very still...

Download script:
heart_rate_monitor.py

Density Ratio Hidden Markov Models

Method for applying density ratio estimation methods to HMMs in order to get better discriminative performance. More information, Python/Matlab source code and demo here.

Yes/No Speech Classification Demonstration

Download Python source code:
yesnoclassifier.zip (2Mb)

Example of Bayesian linear classification, showing how it is possible to distinguish between spoken samples of "yes" and "no". The operation of the code is explained in this video lecture: Introduction to Machine Learning. The Python libraries Numpy, Scipy and Matplotlib are needed to run this.

Kalman Filter Diagnostic Dashboard

Download Matlab source code:
kfdd-0.2.tar.gz

A tool to help assess how well a Kalman filter is fitted to a particular sequence of 1D data. The dashboard has three views which give insight into different aspects of the filter performance. The innovations view (above) analyses the residuals between the step-ahead predictions and the actual reference sequence, to see if they have the right characteristics. The predictions view shows how confident the filter is, and the generative view draws samples from the dynamical model in order to see whether they "look right". A demo is included.

Neonatal condition monitoring demo

Download Matlab source code & data:
babymonitoringdemo.tar.gz (5.1Mb)

Demonstration of a condition monitoring system for infants in intensive care. Annotated data is included for 15 premature babies (24 hours of data for each baby, with several measurements channels recorded every second). Some third party code is required:

And optionally, (to try RBPF inference):

To run, make sure these packages are on the Matlab path and follow instructions in README.txt. This code is under active development, so feedback is welcome.

Switching Kalman Filter demo

Download Matlab source code:
skf.tar.gz

A minimal switching Kalman filter implementation, with a toy demonstration. The demo shows classification of different patterns in a sequence. (Note: these models are also variously referred to as Switching Linear Dynamical Systems, Jump Markov Linear Gaussian Models, or as instances of Switching State Space Models.)

AR Yule-Walker

Download Matlab source code:
aryw.m

Find autoregressive (AR) coefficients to fit time series data, using the Yule-Walker equations. This function can take multiple segments of training data.