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
d169ac8b
Commit
d169ac8b
authored
Jan 20, 2019
by
Dan Houghton
Committed by
James Lamb
Jan 19, 2019
Browse files
[R] Correcting lgb.prepare output comment (#1831)
* Correcting lgb.prepare output comment * updated Roxygen files
parent
ace9c99c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
21 deletions
+26
-21
R-package/demo/categorical_features_prepare.R
R-package/demo/categorical_features_prepare.R
+11
-11
R-package/man/lgb.Dataset.Rd
R-package/man/lgb.Dataset.Rd
+2
-1
R-package/man/lgb.cv.Rd
R-package/man/lgb.cv.Rd
+9
-5
R-package/man/lgb.train.Rd
R-package/man/lgb.train.Rd
+4
-4
No files found.
R-package/demo/categorical_features_prepare.R
View file @
d169ac8b
...
@@ -31,24 +31,24 @@ str(bank)
...
@@ -31,24 +31,24 @@ str(bank)
# For this task, we use lgb.prepare
# For this task, we use lgb.prepare
# The function transforms the data into a fittable data
# The function transforms the data into a fittable data
#
#
# Classes
'
data.table
'
and 'data.frame': 4521 obs. of 17 variables:
# Classes
‘
data.table
’
and 'data.frame': 4521 obs. of 17 variables:
# $ age : int 30 33 35 30 59 35 36 39 41 43 ...
# $ age : int 30 33 35 30 59 35 36 39 41 43 ...
# $ job :
chr "unemployed" "services" "management" "management"
...
# $ job :
num 11 8 5 5 2 5 7 10 3 8
...
# $ marital :
chr "married" "married" "single" "married"
...
# $ marital :
num 2 2 3 2 2 3 2 2 2 2
...
# $ education:
chr "primary" "secondary" "tertiary" "tertiary"
...
# $ education:
num 1 2 3 3 2 3 3 2 3 1
...
# $ default :
chr "no" "no" "no" "no"
...
# $ default :
num 1 1 1 1 1 1 1 1 1 1
...
# $ balance : int 1787 4789 1350 1476 0 747 307 147 221 -88 ...
# $ balance : int 1787 4789 1350 1476 0 747 307 147 221 -88 ...
# $ housing :
chr "no" "yes" "yes" "yes"
...
# $ housing :
num 1 2 2 2 2 1 2 2 2 2
...
# $ loan :
chr "no" "yes" "no" "yes"
...
# $ loan :
num 1 2 1 2 1 1 1 1 1 2
...
# $ contact :
chr "cellular" "cellular" "cellular" "unknown"
...
# $ contact :
num 1 1 1 3 3 1 1 1 3 1
...
# $ day : int 19 11 16 3 5 23 14 6 14 17 ...
# $ day : int 19 11 16 3 5 23 14 6 14 17 ...
# $ month :
chr "oct" "may" "apr" "jun"
...
# $ month :
num 11 9 1 7 9 4 9 9 9 1
...
# $ duration : int 79 220 185 199 226 141 341 151 57 313 ...
# $ duration : int 79 220 185 199 226 141 341 151 57 313 ...
# $ campaign : int 1 1 1 4 1 2 1 2 2 1 ...
# $ campaign : int 1 1 1 4 1 2 1 2 2 1 ...
# $ pdays : int -1 339 330 -1 -1 176 330 -1 -1 147 ...
# $ pdays : int -1 339 330 -1 -1 176 330 -1 -1 147 ...
# $ previous : int 0 4 1 0 0 3 2 0 0 2 ...
# $ previous : int 0 4 1 0 0 3 2 0 0 2 ...
# $ poutcome :
chr "unknown" "failure" "failure" "unknown"
...
# $ poutcome :
num 4 1 1 4 4 1 2 4 4 1
...
# $ y :
chr "no" "no" "no" "no"
...
# $ y :
num 1 1 1 1 1 1 1 1 1 1
...
bank
<-
lgb.prepare
(
data
=
bank
)
bank
<-
lgb.prepare
(
data
=
bank
)
str
(
bank
)
str
(
bank
)
...
...
R-package/man/lgb.Dataset.Rd
View file @
d169ac8b
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
\title{Construct lgb.Dataset object}
\title{Construct lgb.Dataset object}
\usage{
\usage{
lgb.Dataset(data, params = list(), reference = NULL, colnames = NULL,
lgb.Dataset(data, params = list(), reference = NULL, colnames = NULL,
categorical_feature = NULL, free_raw_data = TRUE, info = list(), ...)
categorical_feature = NULL, free_raw_data = TRUE, info = list(),
...)
}
}
\arguments{
\arguments{
\item{data}{a \code{matrix} object, a \code{dgCMatrix} object or a character representing a filename}
\item{data}{a \code{matrix} object, a \code{dgCMatrix} object or a character representing a filename}
...
...
R-package/man/lgb.cv.Rd
View file @
d169ac8b
...
@@ -4,11 +4,13 @@
...
@@ -4,11 +4,13 @@
\
alias
{
lgb
.
cv
}
\
alias
{
lgb
.
cv
}
\
title
{
Main
CV
logic
for
LightGBM
}
\
title
{
Main
CV
logic
for
LightGBM
}
\
usage
{
\
usage
{
lgb
.
cv
(
params
=
list
(),
data
,
nrounds
=
10
,
nfold
=
3
,
label
=
NULL
,
lgb
.
cv
(
params
=
list
(),
data
,
nrounds
=
10
,
nfold
=
3
,
weight
=
NULL
,
obj
=
NULL
,
eval
=
NULL
,
verbose
=
1
,
record
=
TRUE
,
label
=
NULL
,
weight
=
NULL
,
obj
=
NULL
,
eval
=
NULL
,
eval_freq
=
1L
,
showsd
=
TRUE
,
stratified
=
TRUE
,
folds
=
NULL
,
verbose
=
1
,
record
=
TRUE
,
eval_freq
=
1L
,
showsd
=
TRUE
,
init_model
=
NULL
,
colnames
=
NULL
,
categorical_feature
=
NULL
,
stratified
=
TRUE
,
folds
=
NULL
,
init_model
=
NULL
,
early_stopping_rounds
=
NULL
,
callbacks
=
list
(),
...)
colnames
=
NULL
,
categorical_feature
=
NULL
,
early_stopping_rounds
=
NULL
,
callbacks
=
list
(),
reset_data
=
FALSE
,
...)
}
}
\
arguments
{
\
arguments
{
\
item
{
params
}{
List
of
parameters
}
\
item
{
params
}{
List
of
parameters
}
...
@@ -62,6 +64,8 @@ If early stopping occurs, the model will have 'best_iter' field}
...
@@ -62,6 +64,8 @@ If early stopping occurs, the model will have 'best_iter' field}
\
item
{
callbacks
}{
list
of
callback
functions
\
item
{
callbacks
}{
list
of
callback
functions
List
of
callback
functions
that
are
applied
at
each
iteration
.}
List
of
callback
functions
that
are
applied
at
each
iteration
.}
\
item
{
reset_data
}{
Boolean
,
setting
it
to
TRUE
(
not
the
default
value
)
will
transform
the
booster
model
into
a
predictor
model
which
frees
up
memory
and
the
original
datasets
}
\
item
{...}{
other
parameters
,
see
Parameters
.
rst
for
more
information
.
A
few
key
parameters
:
\
item
{...}{
other
parameters
,
see
Parameters
.
rst
for
more
information
.
A
few
key
parameters
:
\
itemize
{
\
itemize
{
\
item
{
boosting
}{
Boosting
type
.
\
code
{
"gbdt"
}
or
\
code
{
"dart"
}}
\
item
{
boosting
}{
Boosting
type
.
\
code
{
"gbdt"
}
or
\
code
{
"dart"
}}
...
...
R-package/man/lgb.train.Rd
View file @
d169ac8b
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
\
title
{
Main
training
logic
for
LightGBM
}
\
title
{
Main
training
logic
for
LightGBM
}
\
usage
{
\
usage
{
lgb
.
train
(
params
=
list
(),
data
,
nrounds
=
10
,
valids
=
list
(),
lgb
.
train
(
params
=
list
(),
data
,
nrounds
=
10
,
valids
=
list
(),
obj
=
NULL
,
eval
=
NULL
,
verbose
=
1
,
record
=
TRUE
,
eval_freq
=
1L
,
obj
=
NULL
,
eval
=
NULL
,
verbose
=
1
,
record
=
TRUE
,
init_model
=
NULL
,
colnames
=
NULL
,
categorical_feature
=
NULL
,
eval_freq
=
1L
,
init_model
=
NULL
,
colnames
=
NULL
,
early_stopping_rounds
=
NULL
,
callbacks
=
list
(),
reset_data
=
FALSE
,
categorical_feature
=
NULL
,
early_stopping_rounds
=
NULL
,
...)
callbacks
=
list
(),
reset_data
=
FALSE
,
...)
}
}
\
arguments
{
\
arguments
{
\
item
{
params
}{
List
of
parameters
}
\
item
{
params
}{
List
of
parameters
}
...
...
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