예제 #1
0
파일: test.py 프로젝트: jsachs/uchi_ai
def test4(data, labels, test_data, sigma):
	"""Batch test of kernel perceptron"""
	p4 = KP(data, labels)
	it, err = p4.train_batch(sigma)
	print "Iterations:", it
	print "Error:", err
	p4.label_test(test_data, sigma)
	return
예제 #2
0
파일: test.py 프로젝트: jsachs/uchi_ai
def test3(data, labels, sigma):
	"""Online test of kernel perceptron"""
	p3 = KP(data, labels)
	right, wrong, error = p3.train_online(sigma)
	print "Right:", right
	print "Wrong:", wrong
	print "Error:", error
	return