Minor edits to coding style (#2835)

* Some minor changes to the code style

Some minor changes to the code style in file basic_walkthrough.py

* coding style changes

* coding style changes arrcording PEP8

* Update basic_walkthrough.py
This commit is contained in:
LevineHuang 2017-10-27 11:12:54 +08:00 committed by Yuan (Terry) Tang
parent d9d5293cdb
commit 91af8f7106
10 changed files with 51 additions and 52 deletions

View File

@ -78,5 +78,3 @@ npymat = csr.todense()
dtrain = xgb.DMatrix(npymat, label=labels) dtrain = xgb.DMatrix(npymat, label=labels)
watchlist = [(dtest, 'eval'), (dtrain, 'train')] watchlist = [(dtest, 'eval'), (dtrain, 'train')]
bst = xgb.train(param, dtrain, num_round, watchlist) bst = xgb.train(param, dtrain, num_round, watchlist)

View File

@ -20,5 +20,6 @@ ptest = bst.predict(dtest, output_margin=True)
dtrain.set_base_margin(ptrain) dtrain.set_base_margin(ptrain)
dtest.set_base_margin(ptest) dtest.set_base_margin(ptest)
print('this is result of running from initial prediction') print('this is result of running from initial prediction')
bst = xgb.train(param, dtrain, 1, watchlist) bst = xgb.train(param, dtrain, 1, watchlist)