def tau_range(self, trange):
"""Return a scaled tau range.
Tau scaling factor is the maximum tau value to avoid and empty solution
(where all variables are discarded).
The value is estimated on the maximum correlation between data and
labels.
Parameters
----------
trange : :class:`numpy.ndarray`
Tau range containing relative values (expected maximum is lesser
than 1.0 and minimum greater than 0.0).
Returns
-------
tau_range : :class:`numpy.ndarray`
Scaled tau range.
"""
if np.max(trange) >= 1.0 or np.min(trange) < 0.0:
raise ValueError('Relative tau should be in [0,1)')
if isinstance(trange, Sequence):
trange = np.sort(trange)
return trange * self.tau_scaling_factor
评论列表
文章目录