A python implementation of Generative Topographic Mapping.
This is beta release. For example, this project has no test as you can see.
- numpy
- scipy
- scikit-learn
To install PyGTM, use pip
$ pip install -U pygtm
The pygtm package inherits scikit-learn classes.
from pygtm import GTM
from sklearn.datasets import load_iris
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
iris = load_iris()
model = make_pipeline(
StandardScaler(),
GTM(n_components=2)
)
embedding = model.fit_transform(iris.data)