def mu_range(self, mrange):
"""Return a scaled mu range.
Mu scaling factor is estimated on the maximum eigenvalue of the
correlation matrix and is used to simplify the parameters choice.
Parameters
----------
mrange : :class:`numpy.ndarray`
Mu range containing relative values (expected maximum is lesser
than 1.0 and minimum greater than 0.0).
Returns
-------
mu_range : :class:`numpy.ndarray`
Scaled mu range.
"""
if np.min(mrange) < 0.0:
raise ValueError('Relative mu should be greater than / equal to 0')
if isinstance(mrange, Sequence):
mrange = np.sort(mrange)
return mrange * self.mu_scaling_factor
评论列表
文章目录