# Code

## Blind source separation

### Using temporal predictability

The method described in the paper 'Blind source separation using temporal predictability', *Neural Computation*, 13(7), July 2001.

MATLAB code (TAR, 30KB)

A key feature of this code is that it executes source separation of 1D signals using a fast eigenvalue routine.

**Paper abstract**

A measure of temporal predictability is defined, and used to separate linear mixtures of signals. Given any set of statistically independent source signals, it is conjectured here that a linear mixture of those signals has the following property: the temporal predictability of any signal mixture is less than (or equal to) that of any of its component source signals.

It is shown that this property can be used to recover source signals from a set of linear mixtures of those signals by finding an un-mixing matrix which maximises a measure of temporal predictability for each recovered signal.

This matrix is obtained as the solution to a generalised eigenvalue problem; such problems have scaling characteristics of O(N^3), where N is the number of signal mixtures.

In contrast to independent component analysis, the temporal predictability method requires minimal assumptions regarding the probability density functions of source signals.

It is demonstrated that the method can separate signal mixtures in which each mixture is a linear combination of source signals with super-Gaussian, sub-Gaussian, and Gaussian probability density functions, and on mixtures of voices and music.

## Independent component analysis MATLAB code

Download the MATLAB code for using independent component analysis (ICA) (ZIP, 195KB).

Summary information about this code can be viewed from the README file (TXT, 8KB). This code is based on the method described in Bell and Sejnowski's paper 'An information-maximization approach to blind separation and blind deconvolution', *Neural Computation*, 7, pp. 1129-1159, 1995.

Key features of this code are that

it uses a conjugate gradient method, and does not therefore require a learning rate parameter

it executes spatial or temporal or spatiotemporal ICA of 2D images

it has the option to specify a skewed pdf.

Download the MATLAB code (ZIP, 195KB)

Download the code for non-square un-mixing matrices (with more mixtures than sources) (ZIP, 26KB).

The paper that describes the method can be found on the Publications page – 'Undercomplete independent component analysis for signal separation and dimension reduction'.

## Reinforcement learning MATLAB code

Download the MATLAB code for reinforcement learning (TXT, 5KB).

This code implements the Markov chain example given on page 18 of R. S. Sutton's paper 'Learning to predict by the methods of temporal differences', *Machine Learning*, 3, pp. 9–44, 1988.

## Baldwin Effect MATLAB Code

Download MATLAB code for the Baldwin effect (M, 3KB), as described in Hinton and Nowlan's paper.

Hinton, G. E. and Nowlan, S. J. 'How learning can guide evolution', *Complex Systems*, 1, pp. 495–502, 1987.