Optimal transport for Gaussian Mixtures
FunctionsCompute the matrix of the squared Bures distances between the components of two Gaussian Mixture Models (GMMs). Used to compute the GMM Optimal Transport distance [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
dist – Matrix of squared Bures distances between the components of the source and target GMMs.
array-like, shape (k_s, k_t)
References
Compute the probability density function of a multivariate Gaussian distribution.
x (array-like, shape (..., d)) – The input samples.
m (array-like, shape (d,)) – The mean vector of the Gaussian distribution.
C (array-like, shape (d, d)) – The covariance matrix of the Gaussian distribution.
pdf – The probability density function evaluated at each sample.
array-like, shape (…,)
Apply Gaussian Mixture Model (GMM) optimal transport (OT) mapping to input data. The ‘barycentric’ mapping corresponds to the barycentric projection of the GMM-OT plan, and is called T_bary in [69]. The ‘random’ mapping takes for each input point a random pair (i,j) of components of the GMMs and applied the Gaussian map, it is called T_rand in [69].
x (array-like, shape (n_samples, d)) – Input data points.
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM components.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM components.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM components.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM components.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
plan (array-like, shape (k_s, k_t), optional) – Optimal transport plan between the source and target GMM components. If not provided, it will be computed internally.
method ({'bary', 'rand'}, optional) – Method for applying the GMM OT mapping. ‘bary’ uses barycentric mapping, while ‘rand’ uses random sampling. Default is ‘bary’.
seed (int, optional) – Seed for the random number generator. Only used when method=’rand’.
out – Output data points after applying the GMM OT mapping.
array-like, shape (n_samples, d)
References
ot.gmm.gmm_ot_apply_map
Compute the Gaussian Mixture Model (GMM) Optimal Transport distance between two GMMs introduced in [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
log (bool, optional (default=False)) – If True, returns a dictionary containing the cost and dual variables. Otherwise returns only the GMM optimal transportation cost.
loss (float or array-like) – The GMM-OT loss.
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
ot.gmm.gmm_ot_loss
Compute the Gaussian Mixture Model (GMM) Optimal Transport plan between two GMMs introduced in [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
log (bool, optional (default=False)) – If True, returns a dictionary containing the cost and dual variables. Otherwise returns only the GMM optimal transportation matrix.
plan (array-like, shape (k_s, k_t)) – The GMM-OT plan.
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
Compute the density of the Gaussian Mixture Model - Optimal Transport coupling between GMMS at given points, as introduced in [69]. Given two arrays of points x and y, the function computes the density at each point (x[i], y[i]) of the product space.
x (array-like, shape (n, d)) – Entry points in source space for density computation.
y (array-like, shape (m, d)) – Entry points in target space for density computation.
m_s (array-like, shape (k_s, d)) – The means of the source GMM components.
m_t (array-like, shape (k_t, d)) – The means of the target GMM components.
C_s (array-like, shape (k_s, d, d)) – The covariance matrices of the source GMM components.
C_t (array-like, shape (k_t, d, d)) – The covariance matrices of the target GMM components.
w_s (array-like, shape (k_s,)) – The weights of the source GMM components.
w_t (array-like, shape (k_t,)) – The weights of the target GMM components.
plan (array-like, shape (k_s, k_t), optional) – The optimal transport plan between the source and target GMMs. If not provided, it will be computed using gmm_ot_plan.
atol (float, optional) – The absolute tolerance used to determine the support of the GMM-OT coupling.
density – The density of the GMM-OT coupling between the two GMMs.
array-like, shape (n, m)
References
ot.gmm.gmm_ot_plan_density
Compute the probability density function (PDF) of a Gaussian Mixture Model (GMM) at given points.
x (array-like, shape (..., d)) – The input samples.
m (array-like, shape (n_components, d)) – The means of the Gaussian components.
C (array-like, shape (n_components, d, d)) – The covariance matrices of the Gaussian components.
w (array-like, shape (n_components,)) – The weights of the Gaussian components.
out – The PDF values at the given points.
array-like, shape (…,)
ot.gmm.gmm_pdf
Compute the matrix of the squared Bures distances between the components of two Gaussian Mixture Models (GMMs). Used to compute the GMM Optimal Transport distance [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
dist – Matrix of squared Bures distances between the components of the source and target GMMs.
array-like, shape (k_s, k_t)
References
Compute the probability density function of a multivariate Gaussian distribution.
x (array-like, shape (..., d)) – The input samples.
m (array-like, shape (d,)) – The mean vector of the Gaussian distribution.
C (array-like, shape (d, d)) – The covariance matrix of the Gaussian distribution.
pdf – The probability density function evaluated at each sample.
array-like, shape (…,)
Apply Gaussian Mixture Model (GMM) optimal transport (OT) mapping to input data. The ‘barycentric’ mapping corresponds to the barycentric projection of the GMM-OT plan, and is called T_bary in [69]. The ‘random’ mapping takes for each input point a random pair (i,j) of components of the GMMs and applied the Gaussian map, it is called T_rand in [69].
x (array-like, shape (n_samples, d)) – Input data points.
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM components.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM components.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM components.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM components.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
plan (array-like, shape (k_s, k_t), optional) – Optimal transport plan between the source and target GMM components. If not provided, it will be computed internally.
method ({'bary', 'rand'}, optional) – Method for applying the GMM OT mapping. ‘bary’ uses barycentric mapping, while ‘rand’ uses random sampling. Default is ‘bary’.
seed (int, optional) – Seed for the random number generator. Only used when method=’rand’.
out – Output data points after applying the GMM OT mapping.
array-like, shape (n_samples, d)
References
Compute the Gaussian Mixture Model (GMM) Optimal Transport distance between two GMMs introduced in [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
log (bool, optional (default=False)) – If True, returns a dictionary containing the cost and dual variables. Otherwise returns only the GMM optimal transportation cost.
loss (float or array-like) – The GMM-OT loss.
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
Compute the Gaussian Mixture Model (GMM) Optimal Transport plan between two GMMs introduced in [69].
m_s (array-like, shape (k_s, d)) – Mean vectors of the source GMM.
m_t (array-like, shape (k_t, d)) – Mean vectors of the target GMM.
C_s (array-like, shape (k_s, d, d)) – Covariance matrices of the source GMM.
C_t (array-like, shape (k_t, d, d)) – Covariance matrices of the target GMM.
w_s (array-like, shape (k_s,)) – Weights of the source GMM components.
w_t (array-like, shape (k_t,)) – Weights of the target GMM components.
log (bool, optional (default=False)) – If True, returns a dictionary containing the cost and dual variables. Otherwise returns only the GMM optimal transportation matrix.
plan (array-like, shape (k_s, k_t)) – The GMM-OT plan.
log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status
References
Compute the density of the Gaussian Mixture Model - Optimal Transport coupling between GMMS at given points, as introduced in [69]. Given two arrays of points x and y, the function computes the density at each point (x[i], y[i]) of the product space.
x (array-like, shape (n, d)) – Entry points in source space for density computation.
y (array-like, shape (m, d)) – Entry points in target space for density computation.
m_s (array-like, shape (k_s, d)) – The means of the source GMM components.
m_t (array-like, shape (k_t, d)) – The means of the target GMM components.
C_s (array-like, shape (k_s, d, d)) – The covariance matrices of the source GMM components.
C_t (array-like, shape (k_t, d, d)) – The covariance matrices of the target GMM components.
w_s (array-like, shape (k_s,)) – The weights of the source GMM components.
w_t (array-like, shape (k_t,)) – The weights of the target GMM components.
plan (array-like, shape (k_s, k_t), optional) – The optimal transport plan between the source and target GMMs. If not provided, it will be computed using gmm_ot_plan.
atol (float, optional) – The absolute tolerance used to determine the support of the GMM-OT coupling.
density – The density of the GMM-OT coupling between the two GMMs.
array-like, shape (n, m)
References
Compute the probability density function (PDF) of a Gaussian Mixture Model (GMM) at given points.
x (array-like, shape (..., d)) – The input samples.
m (array-like, shape (n_components, d)) – The means of the Gaussian components.
C (array-like, shape (n_components, d, d)) – The covariance matrices of the Gaussian components.
w (array-like, shape (n_components,)) – The weights of the Gaussian components.
out – The PDF values at the given points.
array-like, shape (…,)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4