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
3089f0bb
Commit
3089f0bb
authored
Jun 07, 2017
by
Guolin Ke
Browse files
remove a non-need check.
parent
edfc2035
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
src/treelearner/data_partition.hpp
src/treelearner/data_partition.hpp
+1
-2
src/treelearner/serial_tree_learner.cpp
src/treelearner/serial_tree_learner.cpp
+1
-1
No files found.
src/treelearner/data_partition.hpp
View file @
3089f0bb
...
@@ -91,7 +91,7 @@ public:
...
@@ -91,7 +91,7 @@ public:
* \param threshold threshold that want to split
* \param threshold threshold that want to split
* \param right_leaf index of right leaf
* \param right_leaf index of right leaf
*/
*/
void
Split
(
int
leaf
,
const
Dataset
*
dataset
,
int
feature
,
uint32_t
threshold
,
uint32_t
default_bin_for_zero
,
int
right_leaf
,
int
expected_left_cnt
)
{
void
Split
(
int
leaf
,
const
Dataset
*
dataset
,
int
feature
,
uint32_t
threshold
,
uint32_t
default_bin_for_zero
,
int
right_leaf
)
{
const
data_size_t
min_inner_size
=
512
;
const
data_size_t
min_inner_size
=
512
;
// get leaf boundary
// get leaf boundary
const
data_size_t
begin
=
leaf_begin_
[
leaf
];
const
data_size_t
begin
=
leaf_begin_
[
leaf
];
...
@@ -141,7 +141,6 @@ public:
...
@@ -141,7 +141,6 @@ public:
}
}
// update leaf boundary
// update leaf boundary
leaf_count_
[
leaf
]
=
left_cnt
;
leaf_count_
[
leaf
]
=
left_cnt
;
CHECK
(
left_cnt
==
expected_left_cnt
);
leaf_begin_
[
right_leaf
]
=
left_cnt
+
begin
;
leaf_begin_
[
right_leaf
]
=
left_cnt
+
begin
;
leaf_count_
[
right_leaf
]
=
cnt
-
left_cnt
;
leaf_count_
[
right_leaf
]
=
cnt
-
left_cnt
;
}
}
...
...
src/treelearner/serial_tree_learner.cpp
View file @
3089f0bb
...
@@ -564,7 +564,7 @@ void SerialTreeLearner::Split(Tree* tree, int best_Leaf, int* left_leaf, int* ri
...
@@ -564,7 +564,7 @@ void SerialTreeLearner::Split(Tree* tree, int best_Leaf, int* left_leaf, int* ri
default_value
);
default_value
);
// split data partition
// split data partition
data_partition_
->
Split
(
best_Leaf
,
train_data_
,
inner_feature_index
,
data_partition_
->
Split
(
best_Leaf
,
train_data_
,
inner_feature_index
,
best_split_info
.
threshold
,
best_split_info
.
default_bin_for_zero
,
*
right_leaf
,
best_split_info
.
left_count
);
best_split_info
.
threshold
,
best_split_info
.
default_bin_for_zero
,
*
right_leaf
);
// init the leaves that used on next iteration
// init the leaves that used on next iteration
if
(
best_split_info
.
left_count
<
best_split_info
.
right_count
)
{
if
(
best_split_info
.
left_count
<
best_split_info
.
right_count
)
{
...
...
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