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).
- 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:
x (ndarray of shape (L, N_obs)) – Input matrix x with shape (L, N_obs).
x_incertitude (ndarray of shape (L, N_obs), optional) – Uncertainty in x with shape (L, N_obs).
- 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.