def _get_params(self, weights, k):
"""Return the learning rate cone, cmu, cc depending on k
Parameters
----------
weights : list of float
the weight values for vectors used to update the distribution
k : int
the number of vectors for covariance matrix
Returns
-------
cone, cmu, cc : float in [0, 1]. Learning rates for rank-one, rank-mu,
and the cumulation factor for rank-one.
"""
w = np.array(weights)
mueff = np.sum(w[w > 0.])**2 / np.dot(w[w > 0.], w[w > 0.])
return self._get_params2(mueff, k)
评论列表
文章目录