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
d84e9a2e
Unverified
Commit
d84e9a2e
authored
Apr 04, 2020
by
Nikita Titov
Committed by
GitHub
Apr 04, 2020
Browse files
fixed cpplint errors (#2971)
parent
15250df8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
include/LightGBM/utils/openmp_wrapper.h
include/LightGBM/utils/openmp_wrapper.h
+2
-1
src/io/tree.cpp
src/io/tree.cpp
+2
-2
src/lightgbm_R.cpp
src/lightgbm_R.cpp
+2
-2
No files found.
include/LightGBM/utils/openmp_wrapper.h
View file @
d84e9a2e
...
...
@@ -6,9 +6,10 @@
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <omp.h>
#include <LightGBM/utils/log.h>
#include <omp.h>
#include <exception>
#include <memory>
#include <mutex>
...
...
src/io/tree.cpp
View file @
d84e9a2e
...
...
@@ -71,7 +71,7 @@ int Tree::SplitCategorical(int leaf, int feature, int real_feature, const uint32
int
new_node_idx
=
num_leaves_
-
1
;
decision_type_
[
new_node_idx
]
=
0
;
SetDecisionType
(
&
decision_type_
[
new_node_idx
],
true
,
kCategoricalMask
);
SetMissingType
(
&
decision_type_
[
new_node_idx
],
missing_type
);
SetMissingType
(
&
decision_type_
[
new_node_idx
],
missing_type
);
threshold_in_bin_
[
new_node_idx
]
=
num_cat_
;
threshold_
[
new_node_idx
]
=
num_cat_
;
++
num_cat_
;
...
...
@@ -335,7 +335,7 @@ std::string Tree::NumericalDecisionIfElse(int node) const {
std
::
stringstream
str_buf
;
uint8_t
missing_type
=
GetMissingType
(
decision_type_
[
node
]);
bool
default_left
=
GetDecisionType
(
decision_type_
[
node
],
kDefaultLeftMask
);
if
(
missing_type
==
MissingType
::
None
if
(
missing_type
==
MissingType
::
None
||
(
missing_type
==
MissingType
::
Zero
&&
default_left
&&
kZeroThreshold
<
threshold_
[
node
]))
{
str_buf
<<
"if (fval <= "
<<
threshold_
[
node
]
<<
") {"
;
}
else
if
(
missing_type
==
MissingType
::
Zero
)
{
...
...
src/lightgbm_R.cpp
View file @
d84e9a2e
...
...
@@ -9,6 +9,8 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <R_ext/Rdynload.h>
#include <string>
#include <cstdio>
#include <cstring>
...
...
@@ -16,8 +18,6 @@
#include <utility>
#include <vector>
#include <R_ext/Rdynload.h>
#define COL_MAJOR (0)
#define R_API_BEGIN() \
...
...
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