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
edbe3683
Unverified
Commit
edbe3683
authored
Aug 15, 2020
by
Nikita Titov
Committed by
GitHub
Aug 15, 2020
Browse files
fix typo (#3309)
* fix typo * fix typo
parent
03910760
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
src/io/dense_bin.hpp
src/io/dense_bin.hpp
+7
-7
src/io/sparse_bin.hpp
src/io/sparse_bin.hpp
+7
-7
No files found.
src/io/dense_bin.hpp
View file @
edbe3683
...
@@ -310,7 +310,7 @@ class DenseBin : public Bin {
...
@@ -310,7 +310,7 @@ class DenseBin : public Bin {
data_size_t
SplitCategoricalInner
(
uint32_t
min_bin
,
uint32_t
max_bin
,
data_size_t
SplitCategoricalInner
(
uint32_t
min_bin
,
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
{
data_size_t
*
gt_indices
)
const
{
...
@@ -320,7 +320,7 @@ class DenseBin : public Bin {
...
@@ -320,7 +320,7 @@ class DenseBin : public Bin {
data_size_t
*
default_count
=
&
gt_count
;
data_size_t
*
default_count
=
&
gt_count
;
int8_t
offset
=
most_freq_bin
==
0
?
1
:
0
;
int8_t
offset
=
most_freq_bin
==
0
?
1
:
0
;
if
(
most_freq_bin
>
0
&&
if
(
most_freq_bin
>
0
&&
Common
::
FindInBitset
(
threshold
,
num_thre
a
hold
,
most_freq_bin
))
{
Common
::
FindInBitset
(
threshold
,
num_thre
s
hold
,
most_freq_bin
))
{
default_indices
=
lte_indices
;
default_indices
=
lte_indices
;
default_count
=
&
lte_count
;
default_count
=
&
lte_count
;
}
}
...
@@ -331,7 +331,7 @@ class DenseBin : public Bin {
...
@@ -331,7 +331,7 @@ class DenseBin : public Bin {
default_indices
[(
*
default_count
)
++
]
=
idx
;
default_indices
[(
*
default_count
)
++
]
=
idx
;
}
else
if
(
!
USE_MIN_BIN
&&
bin
==
0
)
{
}
else
if
(
!
USE_MIN_BIN
&&
bin
==
0
)
{
default_indices
[(
*
default_count
)
++
]
=
idx
;
default_indices
[(
*
default_count
)
++
]
=
idx
;
}
else
if
(
Common
::
FindInBitset
(
threshold
,
num_thre
a
hold
,
}
else
if
(
Common
::
FindInBitset
(
threshold
,
num_thre
s
hold
,
bin
-
min_bin
+
offset
))
{
bin
-
min_bin
+
offset
))
{
lte_indices
[
lte_count
++
]
=
idx
;
lte_indices
[
lte_count
++
]
=
idx
;
}
else
{
}
else
{
...
@@ -343,22 +343,22 @@ class DenseBin : public Bin {
...
@@ -343,22 +343,22 @@ class DenseBin : public Bin {
data_size_t
SplitCategorical
(
uint32_t
min_bin
,
uint32_t
max_bin
,
data_size_t
SplitCategorical
(
uint32_t
min_bin
,
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
const
uint32_t
*
threshold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
data_size_t
*
gt_indices
)
const
override
{
return
SplitCategoricalInner
<
true
>
(
min_bin
,
max_bin
,
most_freq_bin
,
return
SplitCategoricalInner
<
true
>
(
min_bin
,
max_bin
,
most_freq_bin
,
threshold
,
num_thre
a
hold
,
data_indices
,
threshold
,
num_thre
s
hold
,
data_indices
,
cnt
,
lte_indices
,
gt_indices
);
cnt
,
lte_indices
,
gt_indices
);
}
}
data_size_t
SplitCategorical
(
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
data_size_t
SplitCategorical
(
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
const
uint32_t
*
threshold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
data_size_t
*
gt_indices
)
const
override
{
return
SplitCategoricalInner
<
false
>
(
1
,
max_bin
,
most_freq_bin
,
threshold
,
return
SplitCategoricalInner
<
false
>
(
1
,
max_bin
,
most_freq_bin
,
threshold
,
num_thre
a
hold
,
data_indices
,
cnt
,
num_thre
s
hold
,
data_indices
,
cnt
,
lte_indices
,
gt_indices
);
lte_indices
,
gt_indices
);
}
}
...
...
src/io/sparse_bin.hpp
View file @
edbe3683
...
@@ -355,7 +355,7 @@ class SparseBin : public Bin {
...
@@ -355,7 +355,7 @@ class SparseBin : public Bin {
data_size_t
SplitCategoricalInner
(
uint32_t
min_bin
,
uint32_t
max_bin
,
data_size_t
SplitCategoricalInner
(
uint32_t
min_bin
,
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
{
data_size_t
*
gt_indices
)
const
{
...
@@ -365,7 +365,7 @@ class SparseBin : public Bin {
...
@@ -365,7 +365,7 @@ class SparseBin : public Bin {
data_size_t
*
default_count
=
&
gt_count
;
data_size_t
*
default_count
=
&
gt_count
;
SparseBinIterator
<
VAL_T
>
iterator
(
this
,
data_indices
[
0
]);
SparseBinIterator
<
VAL_T
>
iterator
(
this
,
data_indices
[
0
]);
int8_t
offset
=
most_freq_bin
==
0
?
1
:
0
;
int8_t
offset
=
most_freq_bin
==
0
?
1
:
0
;
if
(
most_freq_bin
>
0
&&
Common
::
FindInBitset
(
threshold
,
num_thre
a
hold
,
most_freq_bin
))
{
if
(
most_freq_bin
>
0
&&
Common
::
FindInBitset
(
threshold
,
num_thre
s
hold
,
most_freq_bin
))
{
default_indices
=
lte_indices
;
default_indices
=
lte_indices
;
default_count
=
&
lte_count
;
default_count
=
&
lte_count
;
}
}
...
@@ -376,7 +376,7 @@ class SparseBin : public Bin {
...
@@ -376,7 +376,7 @@ class SparseBin : public Bin {
default_indices
[(
*
default_count
)
++
]
=
idx
;
default_indices
[(
*
default_count
)
++
]
=
idx
;
}
else
if
(
!
USE_MIN_BIN
&&
bin
==
0
)
{
}
else
if
(
!
USE_MIN_BIN
&&
bin
==
0
)
{
default_indices
[(
*
default_count
)
++
]
=
idx
;
default_indices
[(
*
default_count
)
++
]
=
idx
;
}
else
if
(
Common
::
FindInBitset
(
threshold
,
num_thre
a
hold
,
}
else
if
(
Common
::
FindInBitset
(
threshold
,
num_thre
s
hold
,
bin
-
min_bin
+
offset
))
{
bin
-
min_bin
+
offset
))
{
lte_indices
[
lte_count
++
]
=
idx
;
lte_indices
[
lte_count
++
]
=
idx
;
}
else
{
}
else
{
...
@@ -388,22 +388,22 @@ class SparseBin : public Bin {
...
@@ -388,22 +388,22 @@ class SparseBin : public Bin {
data_size_t
SplitCategorical
(
uint32_t
min_bin
,
uint32_t
max_bin
,
data_size_t
SplitCategorical
(
uint32_t
min_bin
,
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
const
uint32_t
*
threshold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
data_size_t
*
gt_indices
)
const
override
{
return
SplitCategoricalInner
<
true
>
(
min_bin
,
max_bin
,
most_freq_bin
,
return
SplitCategoricalInner
<
true
>
(
min_bin
,
max_bin
,
most_freq_bin
,
threshold
,
num_thre
a
hold
,
data_indices
,
threshold
,
num_thre
s
hold
,
data_indices
,
cnt
,
lte_indices
,
gt_indices
);
cnt
,
lte_indices
,
gt_indices
);
}
}
data_size_t
SplitCategorical
(
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
data_size_t
SplitCategorical
(
uint32_t
max_bin
,
uint32_t
most_freq_bin
,
const
uint32_t
*
threshold
,
int
num_thre
a
hold
,
const
uint32_t
*
threshold
,
int
num_thre
s
hold
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
const
data_size_t
*
data_indices
,
data_size_t
cnt
,
data_size_t
*
lte_indices
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
data_size_t
*
gt_indices
)
const
override
{
return
SplitCategoricalInner
<
false
>
(
1
,
max_bin
,
most_freq_bin
,
threshold
,
return
SplitCategoricalInner
<
false
>
(
1
,
max_bin
,
most_freq_bin
,
threshold
,
num_thre
a
hold
,
data_indices
,
cnt
,
num_thre
s
hold
,
data_indices
,
cnt
,
lte_indices
,
gt_indices
);
lte_indices
,
gt_indices
);
}
}
...
...
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