Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
29cf97e9
Commit
29cf97e9
authored
Dec 01, 2016
by
Guolin Ke
Browse files
add example and readme
parent
5b539788
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
examples/python-guide/simple_example.py
examples/python-guide/simple_example.py
+10
-0
python-package/README.rst
python-package/README.rst
+19
-0
No files found.
examples/python-guide/simple_example.py
0 → 100644
View file @
29cf97e9
import
numpy
as
np
import
random
import
lightgbm
as
lgb
from
sklearn
import
datasets
,
metrics
,
model_selection
rng
=
np
.
random
.
RandomState
(
2016
)
X
,
y
=
datasets
.
make_classification
(
n_samples
=
10000
,
n_features
=
100
)
x_train
,
x_test
,
y_train
,
y_test
=
model_selection
.
train_test_split
(
X
,
y
,
test_size
=
0.1
,
random_state
=
1
)
lgb_model
=
lgb
.
LGBMClassifier
(
n_estimators
=
100
).
fit
(
x_train
,
y_train
,
[(
x_test
,
y_test
)],
eval_metric
=
"auc"
)
python-package/README.rst
0 → 100644
View file @
29cf97e9
LightGBM Python Package
=======================
Installation
------------
1. Following `Installation Guide <https://github.com/Microsoft/LightGBM/wiki/Installation-Guide>`__ to build first.
For the windows user, please change the build config to ``DLL``.
2. Install with ``cd python-package; python setpy.py install``
Note: Make sure you have `setuptools <https://pypi.python.org/pypi/setuptools>`__
Examples
--------
- Refer also to the walk through examples in `python-guide
folder <https://github.com/Microsoft/LightGBM/tree/master/examples/python-guide>`__
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment