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
4ee993c4
Commit
4ee993c4
authored
Jan 13, 2017
by
Guolin Ke
Committed by
GitHub
Jan 13, 2017
Browse files
Update README.md
parent
92944331
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
R-package/README.md
R-package/README.md
+18
-5
No files found.
R-package/README.md
View file @
4ee993c4
...
@@ -19,11 +19,6 @@ You can also install directly from R using the repository with `devtools`:
...
@@ -19,11 +19,6 @@ You can also install directly from R using the repository with `devtools`:
devtools
::
install_github
(
"Microsoft/LightGBM"
,
subdir
=
"R-package"
)
devtools
::
install_github
(
"Microsoft/LightGBM"
,
subdir
=
"R-package"
)
```
```
To install LightGBM from a specific commit, you can specify the reference, such as the following to install the first release of the R package for LightGBM:
```
r
devtools
::
install_github
(
"Microsoft/LightGBM"
,
ref
=
"1b7643b"
,
subdir
=
"R-package"
)
```
You can check quickly if your LightGBM R package is working by running the following:
You can check quickly if your LightGBM R package is working by running the following:
...
@@ -35,6 +30,24 @@ dtrain <- lgb.Dataset(train$data, label=train$label)
...
@@ -35,6 +30,24 @@ dtrain <- lgb.Dataset(train$data, label=train$label)
params
<-
list
(
objective
=
"regression"
,
metric
=
"l2"
)
params
<-
list
(
objective
=
"regression"
,
metric
=
"l2"
)
model
<-
lgb.cv
(
params
,
dtrain
,
10
,
nfold
=
5
,
min_data
=
1
,
learning_rate
=
1
,
early_stopping_rounds
=
10
)
model
<-
lgb.cv
(
params
,
dtrain
,
10
,
nfold
=
5
,
min_data
=
1
,
learning_rate
=
1
,
early_stopping_rounds
=
10
)
```
```
### OSX installation
The default installation cannot successfully in OSX due to clang in OSX doesn't support openmp.
You can use following scirpts to change default compiler to gcc, then complie LightGBM R-package:
```
brew install gcc --without-multilib
touch ~/.R/Makevars
cat <<EOF >~/.R/Makevars
C=gcc-6
CXX=g++-6
CXX1X=g++-6
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FCFLAGS = -fopenmp
SHLIB_OPENMP_FFLAGS = -fopenmp
EOF
```
Examples
Examples
------------
------------
...
...
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