Skip to content

Commit

Permalink
Update Python-intro.md (#570)
Browse files Browse the repository at this point in the history
Fix coding style inconsistency (quotation mark) and redundant blank space.
  • Loading branch information
yuyuz authored and guolinke committed May 31, 2017
1 parent 1d5867b commit 7c6bb7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/Python-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ train_data = lgb.Dataset('train.svm.bin')

#### To load a numpy array into ```Dataset```:
```python
data = np.random.rand(500,10) # 500 entities, each contains 10 features
data = np.random.rand(500, 10) # 500 entities, each contains 10 features
label = np.random.randint(2, size=500) # binary target
train_data = lgb.Dataset( data, label=label)
train_data = lgb.Dataset(data, label=label)
```
#### To load a scpiy.sparse.csr_matrix array into ```Dataset```:
```python
Expand All @@ -53,7 +53,7 @@ train_data = lgb.Dataset(csr)
#### Saving ```Dataset``` into a LightGBM binary file will make loading faster:
```python
train_data = lgb.Dataset('train.svm.txt')
train_data.save_binary("train.bin")
train_data.save_binary('train.bin')
```
#### Create validation data
```python
Expand Down

0 comments on commit 7c6bb7c

Please sign in to comment.