MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / get_group

Method get_group

python-package/lightgbmmt/basic.py:1546–1559  ·  view source on GitHub ↗

Get the group of the Dataset. Returns ------- group : numpy array or None Group size of each group.

(self)

Source from the content-addressed store, hash-verified

1544 return self.data
1545
1546 def get_group(self):
1547 """Get the group of the Dataset.
1548
1549 Returns
1550 -------
1551 group : numpy array or None
1552 Group size of each group.
1553 """
1554 if self.group is None:
1555 self.group = self.get_field('group')
1556 if self.group is not None:
1557 # group data from LightGBM is boundaries data, need to convert to group size
1558 self.group = np.diff(self.group)
1559 return self.group
1560
1561 def num_data(self):
1562 """Get the number of rows in the Dataset.

Callers 4

test_subset_groupMethod · 0.95
__call__Method · 0.80
__call__Method · 0.80
_make_n_foldsFunction · 0.80

Calls 1

get_fieldMethod · 0.95

Tested by 1

test_subset_groupMethod · 0.76