def adjust_KNearest(self):
        print 'adjusting KNearest ...'
        def f(k):
            samples, labels = self.get_dataset()
            err = cross_validate(KNearest, dict(k=k), samples, labels)
            return k, err
        best_err, best_k = np.inf, -1
        for k, err in self.run_jobs(f, xrange(1, 9)):
            if err < best_err:
                best_err, best_k = err, k
            print 'k = %d, error: %.2f %%' % (k, err*100)
        best_params = dict(k=best_k)
        print 'best params:', best_params, (best_err*100) % 'err: %.2f'
        return best_params
dataset/ETHPy150Open fatcloud/PyCV-time/opencv-official-samples/2.4.9/digits_adjust.py/App.adjust_KNearest/swapped operands of `%`