This commit is contained in:
tqchen 2014-05-16 20:18:34 -07:00
parent cfd6c9e3b7
commit 6c72d02205

View File

@ -37,6 +37,6 @@ bst = xgb.train(param, xg_train, num_round, watchlist );
# get prediction # get prediction
pred = bst.predict( xg_test ); pred = bst.predict( xg_test );
print 'error=%f' % sum(int(pred[i]) != test_Y[i] for i in len(test_Y)) / float(len(test_Y)) print 'predicting, classification error=%f' % (sum( int(pred[i]) != test_Y[i] for i in xrange(len(test_Y))) / float(len(test_Y)) )