Fix minor typos (#2842)

* 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

* Fix minor typo

* Minor edits to coding style

Minor edits to coding style following the proposals of PEP8.
This commit is contained in:
LevineHuang
2017-11-30 03:22:09 +08:00
committed by Tianqi Chen
parent 77715d5c62
commit 878f307948
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import xgboost as xgb
# label need to be 0 to num_class -1
data = np.loadtxt('./dermatology.data', delimiter=',',
converters={33: lambda x:int(x == '?'), 34: lambda x:int(x)-1})
converters={33: lambda x:int(x == '?'), 34: lambda x:int(x) - 1})
sz = data.shape
train = data[:int(sz[0] * 0.7), :]