lib/rumale/decomposition/factor_analysis.rb in rumale-0.18.0 vs lib/rumale/decomposition/factor_analysis.rb in rumale-0.18.1

- old
+ new

@@ -126,31 +126,9 @@ beta = Numo::Linalg.inv(Numo::DFloat.eye(factors.shape[0]) + (factors / @noise_variance).dot(factors.transpose)) z = centered_x.dot((beta.dot(factors) / @noise_variance).transpose) @params[:n_components] == 1 ? z[true, 0].dup : z end - # Dump marshal data. - # @return [Hash] The marshal data. - def marshal_dump - { params: @params, - mean: @mean, - noise_variance: @noise_variance, - components: @components, - loglike: @loglike, - n_iter: @n_iter } - end - - # Load marshal data. - # @return [nil] - def marshal_load(obj) - @params = obj[:params] - @mean = obj[:mean] - @noise_variance = obj[:noise_variance] - @components = obj[:components] - @loglike = obj[:loglike] - @n_iter = obj[:n_iter] - end - private def log_likelihood(cov_mat, factors, noise_vars) n_samples = noise_vars.size fact_cov_mat = factors.transpose.dot(factors) + noise_vars.diag