def apply_dual(self, kernel):
		"""Application of a dual trained oc-svm."""

		# number of training examples
		N = self.samples

		# check number and dims of test data
		(tN,foo) = kernel.size
		if (1 < tN):
			print('Invalid test data')
			return 0, OCSVM.MSG_ERROR

		if (self.isDualTrained!=True):
			print('First train, then test.')
			return 0, OCSVM.MSG_ERROR

		# apply trained classifier
		res = matrix([dotu(kernel[i,:],self.alphas[self.svs]) for i in range(tN)])
		return res, OCSVM.MSG_OK
dataset/ETHPy150Open nicococo/tilitools/ocsvm.py/OCSVM.apply_dual/swapped operands of `<`