Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/y/pystruct-0.2/pystruct/learners/n_slack_ssvm.py   pystruct(Download)
 
from .ssvm import BaseSSVM
from ..utils import unwrap_pairwise, find_constraint
 
 
    def _check_bad_constraint(self, y_hat, slack, old_constraints):
        if slack < 1e-5:
            return True
        y_hat_plain = unwrap_pairwise(y_hat)
 
        already_active = np.any([True for y__, _, _ in old_constraints
                                 if np.all(y_hat_plain ==
                                           unwrap_pairwise(y__))])

src/p/y/pystruct-HEAD/pystruct/learners/n_slack_ssvm.py   pystruct(Download)
 
from .ssvm import BaseSSVM
from ..utils import unwrap_pairwise, find_constraint
 
 
    def _check_bad_constraint(self, y_hat, slack, old_constraints):
        if slack < 1e-5:
            return True
        y_hat_plain = unwrap_pairwise(y_hat)
 
        already_active = np.any([True for y__, _, _ in old_constraints
                                 if np.all(y_hat_plain ==
                                           unwrap_pairwise(y__))])