Skip to content
Snippets Groups Projects
Commit 1c534380 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Added name

parent ba37b6f9
No related branches found
No related tags found
No related merge requests found
Pipeline #59684 failed
......@@ -1072,16 +1072,11 @@ class FactorAnalysisBase(BaseEstimator):
UcT = np.transpose(Uc, axes=(0, 2, 1))
sigma_c = np.reshape(
self.variance_supervector,
(self.ubm.n_gaussians, self.feature_dimension),
)
sigma_c = self.ubm.variances[:, np.newaxis]
n_i_c = np.expand_dims(X_i.n[:, np.newaxis], axis=2)
id_plus_us_prod_inv = I + (
((UcT / sigma_c[:, np.newaxis]) @ Uc) * n_i_c
).sum(axis=0)
id_plus_us_prod_inv = I + (((UcT / sigma_c) @ Uc) * n_i_c).sum(axis=0)
id_plus_us_prod_inv = np.linalg.inv(id_plus_us_prod_inv)
return id_plus_us_prod_inv
......@@ -1135,7 +1130,7 @@ class ISVMachine(FactorAnalysisBase):
"""
def __init__(self, ubm, r_U, em_iterations, relevance_factor=4.0, seed=0):
def __init__(self, ubm, r_U, em_iterations=10, relevance_factor=4.0, seed=0):
super(ISVMachine, self).__init__(
ubm,
r_U=r_U,
......@@ -1320,7 +1315,7 @@ class JFAMachine(FactorAnalysisBase):
"""
def __init__(
self, ubm, r_U, r_V, em_iterations, relevance_factor=4.0, seed=0
self, ubm, r_U, r_V, em_iterations=10, relevance_factor=4.0, seed=0
):
super(JFAMachine, self).__init__(
ubm,
......
#!/usr/bin/env python
# @author: Tiago de Freitas Pereira
import dask
# Dask doesn't have an implementation for `pinv`
......
#!/usr/bin/env python
# @author: Tiago de Freitas Pereira
import dask
from scipy.linalg import pinv
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment