scaler.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:l1l2py 作者: slipguru 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号