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
6d4d1abc
Unverified
Commit
6d4d1abc
authored
Sep 15, 2022
by
James Lamb
Committed by
GitHub
Sep 15, 2022
Browse files
[R-package] improve safety of index selection in plotting (#5485)
parent
a65ba42c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
R-package/R/lgb.plot.importance.R
R-package/R/lgb.plot.importance.R
+1
-1
R-package/R/lgb.plot.interpretation.R
R-package/R/lgb.plot.interpretation.R
+1
-1
No files found.
R-package/R/lgb.plot.importance.R
View file @
6d4d1abc
...
...
@@ -79,7 +79,7 @@ lgb.plot.importance <- function(tree_imp,
)
)
tree_imp
[
.N
:
1L
,
tree_imp
[
rev
(
seq_len
(
.N
))
,
graphics
::
barplot
(
height
=
get
(
measure
)
,
names.arg
=
Feature
...
...
R-package/R/lgb.plot.interpretation.R
View file @
6d4d1abc
...
...
@@ -146,7 +146,7 @@ multiple.tree.plot.interpretation <- function(tree_interpretation,
# create plot
tree_interpretation
[
abs
(
Contribution
)
>
0.0
,
bar_color
:=
"firebrick"
]
tree_interpretation
[
Contribution
==
0.0
,
bar_color
:=
"steelblue"
]
tree_interpretation
[
.N
:
1L
,
tree_interpretation
[
rev
(
seq_len
(
.N
))
,
graphics
::
barplot
(
height
=
Contribution
,
names.arg
=
Feature
...
...
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