click here , for home page and navigation

A collection of no-nonsense GMLVQ demo code

A (hopefully) easy-to-use collection of 'no-nonsense' demo code
in Matlab (TM) is available for Generalized Matrix Relevance Learning (GMLVQ).

The zip-archives contain implementations of batch gradient descent training with automated step size control for the simplest
variants of GMLVQ, procedures for validation and discriminative visualiation, a brief documentation, and example data sets.
It is recommended to use the latest version only, elder versions are provided for completeness and reproducibility of earlier results.

Version 2.3, January 2017:     zip-archive-2.3    bug fixed in averaging of prototypes over runs (**), see also documentation and code

Version 2.2, April 2016:            zip-archive-2.2    improved computation of ROC (*), see documentation and code
Version 2.1, August 2015:        zip-archive-2.1    (see documentation, readme and disclaimer)

Feel free to use the code for getting acquainted with the method, but please do cite the link and papers, if appropriate.
In any case, do not use the code for critical applications and make sure to read the disclaimer.

In the very likely case that you should come across bugs or would like to comment or suggest improvements, please let me know.
Do not expect much of the code in terms of readability and efficiency.
If you would like to keep receiving update notifications, please send an e-mail to

Also note that a more complete and more sophisticated Matlab (TM) implementation of GMLVQ and its variants is available here.

(*) The 'score' of the form 1/2 (1+ (d1-d2)/(d1+d2) ) used in previous versions has been replaced by the unnormalized (d1-d2).
The latter is rescaled to 0....1 only in compute_roc, i.e. the actual ROC computation.

(**) Averages of the prototypes over validation runs (run_L1O or run_validation) were flawed. Essentially, the 'mean prototypes' were stretched by a factor of 2, approximately. All other aspects of the code, training and validation performances etc. were not affected. However, the graphics showing the averaged prototypes displayed stretched versions, unfortunately. Learning curves, averaged matrix etc. were not affected.