def score(self, X, Y):
        if hasattr(self.model, 'batch_loss'):
            losses = self.model.batch_loss(
                Y, self.model.batch_inference(X, self.w))
        else:
            losses = [self.model.loss(y, self.model.inference(y, self.w))
                      for y, y_pred in zip(Y, self.predict(X))]
        max_losses = [self.model.max_loss(y) for y in Y]
        return 1. - np.sum(losses) / float(np.sum(max_losses))
Returns an appropriate script, based on settings, according to
dataset/ETHPy150Open pystruct/pystruct/pystruct/learners/subgradient_latent_ssvm.py/SubgradientLatentSSVM.score--crossover with--dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/_script_from_settings