def confusion_matrix(self,threshold,do_print=False):
		pos_points = [x for x in self.data if x[1] >= threshold]
		neg_points = [x for x in self.data if x[1] < threshold]
		tp,fp,fn,tn = self._calculate_counts(pos_points,neg_points)
		if do_print:
			print "\t Actual class"
			print "\t+(1)\t-(0)"
			print "+(1)\t%i\t%i\tPredicted" % (tp,fp)
			print "-(0)\t%i\t%i\tclass" % (fn,tn)
		return {'TP': tp, 'FP': fp, 'FN': fn, 'TN': tn}
Without type, a boolean value sets field type boolean.
dataset/ETHPy150Open pivotalsoftware/pymadlib/pymadlib/pyroc.py/ROCData.confusion_matrix--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_data_form.py/FormTest.test_makeFieldsUnknownTypeBoolean