olpy/classifiers/scw.py
def _get_alpha(self, m_t, v_t):
        """Computes the alpha for the CW/SCW algorithms.
        
        The `alpha` variable is used to determine the magnitude of
        update that needs to be applied to the weights.

        Args:
            m_t (:obj:`float`): Represents whether there was an error in
                prediction or not. 1 for no error, -1 otherwise.
            v_t (:obj:`float`): Represents how far the point was from its
                actual value.

        Returns:
            float: the value for `alpha`.
        """
        alpha_t = max(0, ((-m_t * self._psi 
                            + math.sqrt((m_t ** 2 * self._phi ** 4) 
                                        / 4 + v_t * self._phi ** 2 * self._xi))
                            / (v_t * self._xi)))
        return min(alpha_t, self._C)
Computes the alpha for the CW/SCW algorithms.
        
        The `alpha` variable is used to determine the magnitude of
        update that needs to be applied to the weights.

        Args:
            m_t (:obj:`float`): Represents whether there was an error in
                prediction or not. 1 for no error, -1 otherwise.
            v_t (:obj:`float`): Represents how far the point was from its
                actual value.

        Returns:
            float: the value for `alpha`.
        
Computes the alpha for the CW/SCW algorithms.
The `alpha` variable is used to determine the magnitude of
update that needs to be applied to the weights.
Computes the alpha for the CW / SCW algorithms . The ` alpha ` variable is used to determine the magnitude of update that needs to be applied to the weights .
def _get_alpha(self, m_t, v_t):
        alpha_t = max(0, ((-m_t * self._psi 
                            + math.sqrt((m_t ** 2 * self._phi ** 4) 
                                        / 4 + v_t * self._phi ** 2 * self._xi))
                            / (v_t * self._xi)))
        return min(alpha_t, self._C)
def _get_alpha ( self , m_t , v_t ) : alpha_t = max ( 0 , ( ( - m_t * self . _psi + math . sqrt ( ( m_t ** 2 * self . _phi ** 4 ) / 4 + v_t * self . _phi ** 2 * self . _xi ) ) / ( v_t * self . _xi ) ) ) return min ( alpha_t , self . _C )
Computes the alpha for the CW/SCW algorithms.
Computes the alpha for the CW / SCW algorithms .
"""Computes the alpha for the CW/SCW algorithms.
        
        The `alpha` variable is used to determine the magnitude of
        update that needs to be applied to the weights.

        Args:
            m_t (:obj:`float`): Represents whether there was an error in
                prediction or not. 1 for no error, -1 otherwise.
            v_t (:obj:`float`): Represents how far the point was from its
                actual value.

        Returns:
            float: the value for `alpha`.
        """
the value for `alpha`.
the value for ` alpha ` .
float
self
m_t
v_t
m_t (
`float`): Represents whether there was an error in
prediction or not. 1 for no error, -1 otherwise.
` float ` ) : Represents whether there was an error in prediction or not . 1 for no error - 1 otherwise .
v_t (
`float`): Represents how far the point was from its
actual value.
` float ` ) : Represents how far the point was from its actual value .