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
8dbc48fd
Commit
8dbc48fd
authored
Mar 21, 2017
by
Guolin Ke
Browse files
fix bug in the last commit.
parent
c060ca75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/io/bin.cpp
src/io/bin.cpp
+1
-1
src/io/dataset_loader.cpp
src/io/dataset_loader.cpp
+1
-1
No files found.
src/io/bin.cpp
View file @
8dbc48fd
...
...
@@ -80,7 +80,7 @@ void BinMapper::FindBin(double* values, int num_sample_values, size_t total_samp
std
::
sort
(
values
,
values
+
num_sample_values
);
// push zero in the front
if
(
num_sample_values
||
(
values
[
0
]
>
0.0
f
&&
zero_cnt
>
0
))
{
if
(
num_sample_values
==
0
||
(
values
[
0
]
>
0.0
f
&&
zero_cnt
>
0
))
{
distinct_values
.
push_back
(
0.0
f
);
counts
.
push_back
(
zero_cnt
);
}
...
...
src/io/dataset_loader.cpp
View file @
8dbc48fd
...
...
@@ -748,7 +748,7 @@ void DatasetLoader::ConstructBinMappersFromTextData(int rank, int num_machines,
bin_type
=
BinType
::
CategoricalBin
;
}
bin_mappers
[
i
].
reset
(
new
BinMapper
());
bin_mappers
[
i
]
->
FindBin
(
sample_values
[
start
[
rank
]
+
i
].
data
(),
static_cast
<
int
>
(
sample_values
[
i
].
size
()),
bin_mappers
[
i
]
->
FindBin
(
sample_values
[
start
[
rank
]
+
i
].
data
(),
static_cast
<
int
>
(
sample_values
[
start
[
rank
]
+
i
].
size
()),
sample_data
.
size
(),
io_config_
.
max_bin
,
io_config_
.
min_data_in_bin
,
filter_cnt
,
bin_type
);
}
// get max_bin
...
...
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