def apply(self, kernel):
        """ Application of dual trained ssad.
            kernel = get_kernel(Y, X[:, cssad.svs], kernel_type, kernel_param)
        """
        if kernel.shape[1] == self.samples:
            # if kernel is not restricted to support vectors
            ay = self.alphas * self.cy
        else:
            ay = self.alphas[self.svs] * self.cy[self.svs]
        return ay.T.dot(kernel.T).T - self.threshold
 Application of dual trained ssad.
            kernel = get_kernel(Y, X[:, cssad.svs], kernel_type, kernel_param)
        
adbench/baseline/DeepSAD/src/baselines/shallow_ssad/ssad_convex.py