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
f660b5fe
Unverified
Commit
f660b5fe
authored
May 31, 2018
by
Guolin Ke
Committed by
GitHub
May 31, 2018
Browse files
disable `reg_sqrt` in huber loss
parent
e5750f18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/objective/regression_objective.hpp
src/objective/regression_objective.hpp
+8
-1
No files found.
src/objective/regression_objective.hpp
View file @
f660b5fe
...
...
@@ -262,10 +262,17 @@ class RegressionHuberLoss: public RegressionL2loss {
public:
explicit
RegressionHuberLoss
(
const
Config
&
config
)
:
RegressionL2loss
(
config
)
{
alpha_
=
static_cast
<
double
>
(
config
.
alpha
);
if
(
sqrt_
)
{
Log
::
Warning
(
"Cannot use sqrt transform in %s Regression, will auto disable it"
,
GetName
());
sqrt_
=
false
;
}
}
explicit
RegressionHuberLoss
(
const
std
::
vector
<
std
::
string
>&
strs
)
:
RegressionL2loss
(
strs
)
{
if
(
sqrt_
)
{
Log
::
Warning
(
"Cannot use sqrt transform in %s Regression, will auto disable it"
,
GetName
());
sqrt_
=
false
;
}
}
~
RegressionHuberLoss
()
{
...
...
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