@@ -1243,7 +1243,7 @@ For wrapper libraries like in Python and R, this information can also be provide
...
@@ -1243,7 +1243,7 @@ For wrapper libraries like in Python and R, this information can also be provide
::
::
[27, 18, 67, ...]
[27, 18, 67, ...]
For example, if you have a 112-document dataset with ``group = [27, 18, 67]``, that means that you have 3 groups, where the first 27 records are in the first group, records 28-45 are in the second group, and records 46-112 are in the third group.
For example, if you have a 112-document dataset with ``group = [27, 18, 67]``, that means that you have 3 groups, where the first 27 records are in the first group, records 28-45 are in the second group, and records 46-112 are in the third group.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
init_score : list, numpy 1-D array, pandas Series or None, optional (default=None)
init_score : list, numpy 1-D array, pandas Series or None, optional (default=None)
Init score for Dataset.
Init score for Dataset.
silent : bool, optional (default=False)
silent : bool, optional (default=False)
...
@@ -1362,7 +1363,8 @@ class Dataset:
...
@@ -1362,7 +1363,8 @@ class Dataset:
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
init_score : list, numpy 1-D array, pandas Series or None, optional (default=None)
init_score : list, numpy 1-D array, pandas Series or None, optional (default=None)
Init score for Dataset.
Init score for Dataset.
silent : bool, optional (default=False)
silent : bool, optional (default=False)
...
@@ -1724,7 +1726,8 @@ class Dataset:
...
@@ -1724,7 +1726,8 @@ class Dataset:
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
Returns
Returns
-------
-------
...
@@ -1842,7 +1845,8 @@ class Dataset:
...
@@ -1842,7 +1845,8 @@ class Dataset:
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
"""
"""
ifself.groupisNone:
ifself.groupisNone:
self.group=self.get_field('group')
self.group=self.get_field('group')
...
@@ -2240,7 +2244,9 @@ class Booster:
...
@@ -2240,7 +2244,9 @@ class Booster:
- ``split_feature`` : string, name of the feature used for splitting. ``None`` for leaf nodes.
- ``split_feature`` : string, name of the feature used for splitting. ``None`` for leaf nodes.
- ``split_gain`` : float64, gain from adding this split to the tree. ``NaN`` for leaf nodes.
- ``split_gain`` : float64, gain from adding this split to the tree. ``NaN`` for leaf nodes.
- ``threshold`` : float64, value of the feature used to decide which side of the split a record will go down. ``NaN`` for leaf nodes.
- ``threshold`` : float64, value of the feature used to decide which side of the split a record will go down. ``NaN`` for leaf nodes.
- ``decision_type`` : string, logical operator describing how to compare a value to ``threshold``. For example, ``split_feature = "Column_10", threshold = 15, decision_type = "<="`` means that records where ``Column_10 <= 15`` follow the left side of the split, otherwise follows the right side of the split. ``None`` for leaf nodes.
- ``decision_type`` : string, logical operator describing how to compare a value to ``threshold``.
For example, ``split_feature = "Column_10", threshold = 15, decision_type = "<="`` means that
records where ``Column_10 <= 15`` follow the left side of the split, otherwise follows the right side of the split. ``None`` for leaf nodes.
- ``missing_direction`` : string, split direction that missing values should go to. ``None`` for leaf nodes.
- ``missing_direction`` : string, split direction that missing values should go to. ``None`` for leaf nodes.
- ``missing_type`` : string, describes what types of values are treated as missing.
- ``missing_type`` : string, describes what types of values are treated as missing.
- ``value`` : float64, predicted value for this leaf node, multiplied by the learning rate.
- ``value`` : float64, predicted value for this leaf node, multiplied by the learning rate.
Whether the returned Booster will be used to keep training.
Whether the returned Booster will be used to keep training.
If False, the returned value will be converted into _InnerPredictor before returning.
If False, the returned value will be converted into _InnerPredictor before returning.
When your model is very large and cause the memory error, you can try to set this param to ``True`` to avoid the model conversion performed during the internal call of ``model_to_string``.
When your model is very large and cause the memory error,
you can try to set this param to ``True`` to avoid the model conversion performed during the internal call of ``model_to_string``.
You can still use _InnerPredictor as ``init_model`` for future continue training.
You can still use _InnerPredictor as ``init_model`` for future continue training.
callbacks : list of callables or None, optional (default=None)
callbacks : list of callables or None, optional (default=None)
List of callback functions that are applied at each iteration.
List of callback functions that are applied at each iteration.
@@ -39,7 +39,8 @@ class _ObjectiveFunctionWrapper:
...
@@ -39,7 +39,8 @@ class _ObjectiveFunctionWrapper:
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
grad : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
grad : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
The value of the first order derivative (gradient) for each sample point.
The value of the first order derivative (gradient) for each sample point.
hess : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
hess : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
...
@@ -128,7 +129,8 @@ class _EvalFunctionWrapper:
...
@@ -128,7 +129,8 @@ class _EvalFunctionWrapper:
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
eval_name : string
eval_name : string
The name of evaluation function (without whitespaces).
The name of evaluation function (without whitespaces).
eval_result : float
eval_result : float
...
@@ -275,7 +277,8 @@ class LGBMModel(_LGBMModelBase):
...
@@ -275,7 +277,8 @@ class LGBMModel(_LGBMModelBase):
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
grad : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
grad : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
The value of the first order derivative (gradient) for each sample point.
The value of the first order derivative (gradient) for each sample point.
hess : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
hess : array-like of shape = [n_samples] or shape = [n_samples * n_classes] (for multi-class task)
...
@@ -396,7 +399,8 @@ class LGBMModel(_LGBMModelBase):
...
@@ -396,7 +399,8 @@ class LGBMModel(_LGBMModelBase):
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
eval_set : list or None, optional (default=None)
eval_set : list or None, optional (default=None)
A list of (X, y) tuple pairs to use as validation sets.
A list of (X, y) tuple pairs to use as validation sets.
eval_names : list of strings or None, optional (default=None)
eval_names : list of strings or None, optional (default=None)
...
@@ -475,7 +479,8 @@ class LGBMModel(_LGBMModelBase):
...
@@ -475,7 +479,8 @@ class LGBMModel(_LGBMModelBase):
Group/query data.
Group/query data.
Only used in the learning-to-rank task.
Only used in the learning-to-rank task.
sum(group) = n_samples.
sum(group) = n_samples.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups, where the first 10 records are in the first group, records 11-30 are in the second group, etc.
For example, if you have a 100-document dataset with ``group = [10, 20, 40, 10, 10, 10]``, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the second group, records 31-70 are in the third group, etc.
eval_name : string
eval_name : string
The name of evaluation function (without whitespaces).
The name of evaluation function (without whitespaces).