예제 #1
0
파일: test.py 프로젝트: jsachs/uchi_ai
def test2(data, labels, test_data):
	"""Batch test of linear perceptron"""
	p2 = LP()
	it, err = p2.train_batch(data, labels)
	print "Iterations:", it
	print "Error:", err
	p2.label_test(test_data)
	return
예제 #2
0
파일: test.py 프로젝트: jsachs/uchi_ai
def test1(data, labels):
	"""Online test of linear perceptron"""
	p1 = LP()
	right, wrong, error = p1.train_online(data, labels)
	print "Right:", right
	print "Wrong:", wrong
	print "Error:", error
	return