"include/LightGBM/utils/json11.h" did not exist on "90127b526be8b13bdf840effacde9e61fa765a6f"
Commit a495a877 authored by Guolin Ke's avatar Guolin Ke
Browse files

fix get_group in python-package

parent cbc56c74
......@@ -1148,6 +1148,12 @@ class Dataset(object):
"""
if self.group is None and self.__is_constructed():
self.group = self.inner_dataset.get_group()
if self.group is not None:
# group data from LightGBM is boundaries data, need to convert to group size
new_group = []
for i in range(len(self.group) - 1):
new_group.append(self.group[i + 1] - self.group[i])
self.group = new_group
return self.group
def num_data(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment