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
7e2f353d
Unverified
Commit
7e2f353d
authored
Oct 18, 2020
by
Anshu Trivedi
Committed by
GitHub
Oct 18, 2020
Browse files
[R-package] Updated lgb.train.R with keyword arguments (#3464)
Co-authored-by:
James Lamb
<
jaylamb20@gmail.com
>
parent
81d76113
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
R-package/R/lgb.Predictor.R
R-package/R/lgb.Predictor.R
+7
-7
No files found.
R-package/R/lgb.Predictor.R
View file @
7e2f353d
...
...
@@ -15,7 +15,7 @@ Predictor <- R6::R6Class(
# Freeing up handle
lgb.call
(
"LGBM_BoosterFree_R"
fun_name
=
"LGBM_BoosterFree_R"
,
ret
=
NULL
,
private
$
handle
)
...
...
@@ -37,7 +37,7 @@ Predictor <- R6::R6Class(
# Create handle on it
handle
<-
lgb.call
(
"LGBM_BoosterCreateFromModelfile_R"
fun_name
=
"LGBM_BoosterCreateFromModelfile_R"
,
ret
=
handle
,
lgb.c_str
(
modelfile
)
)
...
...
@@ -66,7 +66,7 @@ Predictor <- R6::R6Class(
cur_iter
<-
0L
lgb.call
(
"LGBM_BoosterGetCurrentIteration_R"
fun_name
=
"LGBM_BoosterGetCurrentIteration_R"
,
ret
=
cur_iter
,
private
$
handle
)
...
...
@@ -103,7 +103,7 @@ Predictor <- R6::R6Class(
# Predict from temporary file
lgb.call
(
"LGBM_BoosterPredictForFile_R"
fun_name
=
"LGBM_BoosterPredictForFile_R"
,
ret
=
NULL
,
private
$
handle
,
data
...
...
@@ -131,7 +131,7 @@ Predictor <- R6::R6Class(
# Check number of predictions to do
npred
<-
lgb.call
(
"LGBM_BoosterCalcNumPredict_R"
fun_name
=
"LGBM_BoosterCalcNumPredict_R"
,
ret
=
npred
,
private
$
handle
,
as.integer
(
num_row
)
...
...
@@ -153,7 +153,7 @@ Predictor <- R6::R6Class(
storage.mode
(
data
)
<-
"double"
}
preds
<-
lgb.call
(
"LGBM_BoosterPredictForMat_R"
fun_name
=
"LGBM_BoosterPredictForMat_R"
,
ret
=
preds
,
private
$
handle
,
data
...
...
@@ -173,7 +173,7 @@ Predictor <- R6::R6Class(
}
# Check if data is a dgCMatrix (sparse matrix, column compressed format)
preds
<-
lgb.call
(
"LGBM_BoosterPredictForCSC_R"
fun_name
=
"LGBM_BoosterPredictForCSC_R"
,
ret
=
preds
,
private
$
handle
,
data
@
p
...
...
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