Just checking. If it can be done at such a high level, can't it be made
into a @decorator or maybe put in a base class? Anything that could go
wrong?


On Wed, Aug 14, 2013 at 11:09 AM, Andreas Mueller
<notifications@github.com>wrote:

> In pystruct/learners/frankwolfe_ssvm.py:
>
> > +                        print("p = %d, dual: %f, dual_gap: %f, primal: %f, positive slack: %d"
> > +                              % (p, dual_val, dual_gap, primal_val, n_pos_slack))
> > +                    if dual_gap < self.tol:
> > +                        return
> > +
> > +    def fit(self, X, Y):
> > +        self.model.initialize(X, Y)
> > +        self.objective_curve_, self.primal_objective_curve_ = [], []
> > +        self.timestamps_ = [time()]
> > +        self.w = getattr(self, "w", np.zeros(self.model.size_psi))
> > +        try:
> > +            if self.batch_mode:
> > +                self._frank_wolfe_batch(X, Y)
> > +            else:
> > +                self._frank_wolfe_bc(X, Y)
> > +        except KeyboardInterrupt:
>
> I think so, yes. It is the same for SubgradientSSVM. What do youthink
> could go wrong?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pystruct/pystruct/pull/67/files#r5757516>
> .
>