add higgs example

This commit is contained in:
tqchen
2014-08-23 20:52:56 -07:00
parent d86cd62415
commit ed9d8a1c0e
5 changed files with 62 additions and 3 deletions

View File

@@ -21,8 +21,7 @@ idx = dtest[:,0]
print ('finish loading from csv ')
xgmat = xgb.DMatrix( data, missing = -999.0 )
bst = xgb.Booster({'nthread':16})
bst.load_model( modelfile )
bst = xgb.Booster({'nthread':16}, model_file = modelfile)
ypred = bst.predict( xgmat )
res = [ ( int(idx[i]), ypred[i] ) for i in range(len(ypred)) ]