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
670a1d70
"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "8aa08c4af22705338adba9ffbd61a73b8bc7baad"
Commit
670a1d70
authored
Oct 19, 2016
by
Guolin Ke
Committed by
GitHub
Oct 19, 2016
Browse files
warning fixed
parent
3e405f2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/io/parser.cpp
src/io/parser.cpp
+2
-2
No files found.
src/io/parser.cpp
View file @
670a1d70
...
@@ -34,7 +34,7 @@ bool CheckHasLabelForLibsvm(std::string& str) {
...
@@ -34,7 +34,7 @@ bool CheckHasLabelForLibsvm(std::string& str) {
bool
CheckHasLabelForTSV
(
std
::
string
&
str
,
int
num_features
)
{
bool
CheckHasLabelForTSV
(
std
::
string
&
str
,
int
num_features
)
{
str
=
Common
::
Trim
(
str
);
str
=
Common
::
Trim
(
str
);
auto
tokens
=
Common
::
Split
(
str
.
c_str
(),
'\t'
);
auto
tokens
=
Common
::
Split
(
str
.
c_str
(),
'\t'
);
if
(
tokens
.
size
()
==
num_features
)
{
if
(
static_cast
<
int
>
(
tokens
.
size
()
)
==
num_features
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
true
;
return
true
;
...
@@ -44,7 +44,7 @@ bool CheckHasLabelForTSV(std::string& str, int num_features) {
...
@@ -44,7 +44,7 @@ bool CheckHasLabelForTSV(std::string& str, int num_features) {
bool
CheckHasLabelForCSV
(
std
::
string
&
str
,
int
num_features
)
{
bool
CheckHasLabelForCSV
(
std
::
string
&
str
,
int
num_features
)
{
str
=
Common
::
Trim
(
str
);
str
=
Common
::
Trim
(
str
);
auto
tokens
=
Common
::
Split
(
str
.
c_str
(),
','
);
auto
tokens
=
Common
::
Split
(
str
.
c_str
(),
','
);
if
(
tokens
.
size
()
==
num_features
)
{
if
(
static_cast
<
int
>
(
tokens
.
size
()
)
==
num_features
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
true
;
return
true
;
...
...
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