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
74c7904b
Unverified
Commit
74c7904b
authored
Sep 25, 2021
by
Nikita Titov
Committed by
GitHub
Sep 25, 2021
Browse files
[python] deprecate "auto" value of ylabel argument of plot_metric() function (#4624)
parent
b78175b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
python-package/lightgbm/plotting.py
python-package/lightgbm/plotting.py
+4
-2
No files found.
python-package/lightgbm/plotting.py
View file @
74c7904b
...
...
@@ -285,7 +285,7 @@ def plot_metric(
ylim
:
Optional
[
Tuple
[
float
,
float
]]
=
None
,
title
:
Optional
[
str
]
=
'Metric during training'
,
xlabel
:
Optional
[
str
]
=
'Iterations'
,
ylabel
:
Optional
[
str
]
=
'
auto
'
,
ylabel
:
Optional
[
str
]
=
'
@metric@
'
,
figsize
:
Optional
[
Tuple
[
float
,
float
]]
=
None
,
dpi
:
Optional
[
int
]
=
None
,
grid
:
bool
=
True
...
...
@@ -316,7 +316,7 @@ def plot_metric(
xlabel : str or None, optional (default="Iterations")
X-axis title label.
If None, title is disabled.
ylabel : str or None, optional (default="
auto
")
ylabel : str or None, optional (default="
@metric@
")
Y-axis title label.
If 'auto', metric name is used.
If None, title is disabled.
...
...
@@ -402,6 +402,8 @@ def plot_metric(
ax
.
set_ylim
(
ylim
)
if
ylabel
==
'auto'
:
_log_warning
(
"'auto' value of 'ylabel' argument is deprecated and will be removed in a future release of LightGBM. "
"Use '@metric@' placeholder instead."
)
ylabel
=
'@metric@'
if
title
is
not
None
:
...
...
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