(self, margin=1)
Initialize the square hinge loss cost function
Initialize the square hinge loss cost function
Initialize the square hinge loss cost function
def __init__(self, margin=1):
        """
        Initialize the square hinge loss cost function
        """
        self.margin = margin
        self.func = lambda y, t: self.squarehinge(y, t)
        self.funcgrad = lambda y, t: self.squarehingegrad(y, t)
def __init__ ( self , margin = 1 ) : self . margin = margin self . func = lambda y , t : self . squarehinge ( y , t ) self . funcgrad = lambda y , t : self . squarehingegrad ( y , t )