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
665c9dba
Commit
665c9dba
authored
Nov 03, 2016
by
Guolin Ke
Browse files
change the type in set_query_at
parent
fdf1f326
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/LightGBM/dataset.h
include/LightGBM/dataset.h
+1
-1
src/io/dataset.cpp
src/io/dataset.cpp
+3
-3
No files found.
include/LightGBM/dataset.h
View file @
665c9dba
...
@@ -128,7 +128,7 @@ public:
...
@@ -128,7 +128,7 @@ public:
* \param idx Index of this record
* \param idx Index of this record
* \param value Query Id value of this record
* \param value Query Id value of this record
*/
*/
inline
void
SetQueryAt
(
data_size_t
idx
,
floa
t
value
)
inline
void
SetQueryAt
(
data_size_t
idx
,
data_size_
t
value
)
{
{
queries_
[
idx
]
=
static_cast
<
data_size_t
>
(
value
);
queries_
[
idx
]
=
static_cast
<
data_size_t
>
(
value
);
}
}
...
...
src/io/dataset.cpp
View file @
665c9dba
...
@@ -538,7 +538,7 @@ void Dataset::ExtractFeaturesFromMemory() {
...
@@ -538,7 +538,7 @@ void Dataset::ExtractFeaturesFromMemory() {
if
(
inner_data
.
first
==
weight_idx_
)
{
if
(
inner_data
.
first
==
weight_idx_
)
{
metadata_
.
SetWeightAt
(
i
,
static_cast
<
float
>
(
inner_data
.
second
));
metadata_
.
SetWeightAt
(
i
,
static_cast
<
float
>
(
inner_data
.
second
));
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
metadata_
.
SetQueryAt
(
i
,
static_cast
<
floa
t
>
(
inner_data
.
second
));
metadata_
.
SetQueryAt
(
i
,
static_cast
<
data_size_
t
>
(
inner_data
.
second
));
}
}
}
}
}
}
...
@@ -571,7 +571,7 @@ void Dataset::ExtractFeaturesFromMemory() {
...
@@ -571,7 +571,7 @@ void Dataset::ExtractFeaturesFromMemory() {
if
(
inner_data
.
first
==
weight_idx_
)
{
if
(
inner_data
.
first
==
weight_idx_
)
{
metadata_
.
SetWeightAt
(
i
,
static_cast
<
float
>
(
inner_data
.
second
));
metadata_
.
SetWeightAt
(
i
,
static_cast
<
float
>
(
inner_data
.
second
));
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
metadata_
.
SetQueryAt
(
i
,
static_cast
<
floa
t
>
(
inner_data
.
second
));
metadata_
.
SetQueryAt
(
i
,
static_cast
<
data_size_
t
>
(
inner_data
.
second
));
}
}
}
}
}
}
...
@@ -623,7 +623,7 @@ void Dataset::ExtractFeaturesFromFile() {
...
@@ -623,7 +623,7 @@ void Dataset::ExtractFeaturesFromFile() {
if
(
inner_data
.
first
==
weight_idx_
)
{
if
(
inner_data
.
first
==
weight_idx_
)
{
metadata_
.
SetWeightAt
(
start_idx
+
i
,
static_cast
<
float
>
(
inner_data
.
second
));
metadata_
.
SetWeightAt
(
start_idx
+
i
,
static_cast
<
float
>
(
inner_data
.
second
));
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
}
else
if
(
inner_data
.
first
==
group_idx_
)
{
metadata_
.
SetQueryAt
(
start_idx
+
i
,
static_cast
<
floa
t
>
(
inner_data
.
second
));
metadata_
.
SetQueryAt
(
start_idx
+
i
,
static_cast
<
data_size_
t
>
(
inner_data
.
second
));
}
}
}
}
}
}
...
...
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