Imagine being able to understand the core components of your data, manipulate them, and even generate new, realistic samples. This is precisely what the Generative Adversarial Networks for Disentangling And Learning Framework (GANDALF) offers, a dedicated Python framework designed to define, train, test, and visualize disentangling models for scientific applications.
Disentangling learning is a machine learning technique where the objective is to create a data representation where distinct factors or parameters of the input data are deleted. Once this representation is obtained, which will be of a lower dimensionality than the original one, GANDALF can reconstruct the input with the original parameters or new ones, thus functioning as a generative network.

The image above shows the results of applying t-SNE, a non-linear dimensionality reduction technique used for visualizing high-dimensional data. This algorithm can be applied to the spectra and the corresponding latent spaces to assess the level of disentangling. The t-SNE representation from an experiment which attempts to eliminate effective temperature (Teff) in shown in the figure. On the left is the representation of the spectra, x space, where they are grouped according to their temperature. On the other hand, on the right is the latent space, z space, with the unsorted data.

Although GANDALF was originally developed for use with spectral data, it can be applied to any type of data. The figure shows the interactive visualiser that was built using Bokeh. This allows us to view the representations of the input spectra and reconstruct them with new values for their parameters. You can read more about this tool and the scientific discoveries made using it in this paper: https://www.sciencedirect.com/science/article/pii/S1568494625002650