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
f98b8310
Commit
f98b8310
authored
Aug 29, 2017
by
Guolin Ke
Browse files
Don't allow default function arguments.
parent
2c572a71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/LightGBM/tree.h
include/LightGBM/tree.h
+2
-2
No files found.
include/LightGBM/tree.h
View file @
f98b8310
...
@@ -294,7 +294,7 @@ private:
...
@@ -294,7 +294,7 @@ private:
/*! \brief Serialize one node to if-else statement*/
/*! \brief Serialize one node to if-else statement*/
std
::
string
NodeToIfElse
(
int
index
,
bool
is_predict_leaf_index
)
const
;
std
::
string
NodeToIfElse
(
int
index
,
bool
is_predict_leaf_index
)
const
;
double
ExpectedValue
(
int
node
=
0
)
const
;
double
ExpectedValue
(
int
node
)
const
;
int
MaxDepth
()
const
;
int
MaxDepth
()
const
;
...
@@ -423,7 +423,7 @@ inline int Tree::PredictLeafIndex(const double* feature_values) const {
...
@@ -423,7 +423,7 @@ inline int Tree::PredictLeafIndex(const double* feature_values) const {
}
}
inline
void
Tree
::
PredictContrib
(
const
double
*
feature_values
,
int
num_features
,
double
*
output
)
const
{
inline
void
Tree
::
PredictContrib
(
const
double
*
feature_values
,
int
num_features
,
double
*
output
)
const
{
output
[
num_features
]
+=
ExpectedValue
();
output
[
num_features
]
+=
ExpectedValue
(
0
);
// Run the recursion with preallocated space for the unique path data
// Run the recursion with preallocated space for the unique path data
const
int
max_path_len
=
MaxDepth
()
+
1
;
const
int
max_path_len
=
MaxDepth
()
+
1
;
std
::
vector
<
PathElement
>
unique_path_data
((
max_path_len
*
(
max_path_len
+
1
))
/
2
);
std
::
vector
<
PathElement
>
unique_path_data
((
max_path_len
*
(
max_path_len
+
1
))
/
2
);
...
...
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