This page describes the GLLiM main methods.
Main methods
- initialize(t, y, gllim_em_iteration, gllim_em_floor, gmm_kmeans_iteration, gmm_em_iteration, gmm_floor, nb_experiences, seed *=None*, verbose=1)
Initialize the GLLiM model with given data and parameters.
- Parameters:
t (ndarray of shape (L, N)) – Input matrix t with shape (L, N).
y (ndarray of shape (D, N)) – Input matrix y with shape (D, N).
gllim_em_iteration (int) – Number of EM iterations for GLLiM.
gllim_em_floor (float) – Floor value for EM iterations in GLLiM.
gmm_kmeans_iteration (int) – Number of k-means iterations for GMM.
gmm_em_iteration (int) – Number of EM iterations for GMM.
gmm_floor (float) – Floor value for EM iterations in GMM.
nb_experiences (int) – Number of experiences.
seed (int) – Random seed for initialization.
verbose (int) – Verbosity level (default is 1).
- train(x, y, max_iteration, ratio_ll, floor, verbose=1)
Train the GLLiM model with given data and parameters.
- Parameters:
x (ndarray of shape (L, N)) – Input matrix x with shape (L, N).
y (ndarray of shape (D, N)) – Input matrix y with shape (D, N).
max_iteration (int) – Maximum number of iterations.
ratio_ll (float) – Ratio for log-likelihood convergence.
floor (float) – Floor value for the training process.
verbose (int) – Verbosity level (default is 1).
- trainJGMM(x, y, kmeans_iteration, em_iteration, floor, verbose = 1);
Train the GLLiM model with given data and parameters. A classic GMM training is applied on the equivalent joint-GMM to GLLiM. The algorithm is provided by the Armadillo library. Check out the corresponding Armadillo documentation for more details. This option is only available whith (gamma_type = ‘full’, sigma_type = ‘full’) constraints. The training is equivalent and faster than the GLLiM-EM algorithm.
- Parameters:
x (ndarray of shape (L, N)) – Input matrix x with shape (L, N).
y (ndarray of shape (D, N)) – Input matrix y with shape (D, N).
kmeans_iteration (int) – The number of iterations of the k-means algorithm.
em_iteration (int) – The number of iterations of the EM algorithm.
floor (float) – The variance floor (smallest allowed value) for the diagonal covariances; setting this to a small non-zero value can help with convergence and/or better quality parameter estimates.
verbose (int) – Verbosity level (default is 1).
- getInverse()
Get the inverse parameters of the GLLiM model.
- Returns:
(GLLiMParameters) An instance of GLLiMParameters containing the inverse parameters.
- directDensities(x, x_incertitude=0)
Compute the direct densities given input matrix x and its uncertainties.
- Parameters:
- Returns:
(PredictionResult) An instance of PredictionResult containing the direct densities.
- inverseDensities(y, y_incertitude=0, K_merged=0, merging_threshold=1e-10, verbose=0)
Compute the inverse densities given input matrix y and its uncertainties.
- Parameters:
y (ndarray of shape (D, N_obs)) – Input matrix y with shape (D, N_obs).
y_incertitude (ndarray of shape (D, N_obs), optional) – Uncertainty in y with shape (D, N_obs).
K_merged (int, optional) – Merged the full GMM (K components) into K_merged gaussian components.
merging_threshold (float, optional) – Threshold on the merged GMM weights. Gaussian component with a weight below this threshold are ignored.
verbose (int) – Verbosity level (default is 0).
- Returns:
(PredictionResult) An instance of PredictionResult containing the inverse densities.
- getInsights()
Returns an Insights structure with informations about initialisation and training time, log-likelihood and arguments.
- Returns:
(Insights) An instance of Insights containing total initialisation and trining time, training log-likelihood, initialisation specific infirmation and training specific information.