A Julia package for Generative Topographic Mapping originally introduced by Bishop and Svensen with inspiration from the UGTM python package. This implementation provides wrappers for use withing the MLJ framework.
To train a GTM model first load MLJ and this package.
using MLJ, GenerativeTopographicMapping
The GTM can then be instantiated in the usual way for an unsupervised method:
gtm = GTM()
mach = machine(gtm, df)
fit!(mach)
Calling fitted_params
on the trained machine will return a tuple holding the underlying gtm
struct if further inspection is desired.
The GTM model learns a transformation from a latent space of
means = MLJ.transform(mach, X)
Alternatively, the GTM can be viewed as performing an unsupervised classification into
class_label = MLJ.predict(mach, X)
If the full responsibility distribution is desired, you can predict_responsability
on the trained machine
R = predict_responsibility(mach, X)
The GSM (Generative Simplex Mapping) is a riff on the GTM structure designed for unmixing problems. The latent space is chosen to be the
gsm = GSM()
mach = machine(gsm, df)
fit!(mach)