Unverified Commit beb35d56 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs] added note about the spoiled probabilities (#2113)

parent 29617593
...@@ -690,6 +690,8 @@ Objective Parameters ...@@ -690,6 +690,8 @@ Objective Parameters
- set this to ``true`` if training data are unbalanced - set this to ``true`` if training data are unbalanced
- **Note**: while enabling this should increase the overall performance metric of your model, it will also result in poor estimates of the individual class probabilities
- **Note**: this parameter cannot be used at the same time with ``scale_pos_weight``, choose only **one** of them - **Note**: this parameter cannot be used at the same time with ``scale_pos_weight``, choose only **one** of them
- ``scale_pos_weight`` :raw-html:`<a id="scale_pos_weight" title="Permalink to this parameter" href="#scale_pos_weight">&#x1F517;&#xFE0E;</a>`, default = ``1.0``, type = double, constraints: ``scale_pos_weight > 0.0`` - ``scale_pos_weight`` :raw-html:`<a id="scale_pos_weight" title="Permalink to this parameter" href="#scale_pos_weight">&#x1F517;&#xFE0E;</a>`, default = ``1.0``, type = double, constraints: ``scale_pos_weight > 0.0``
...@@ -698,6 +700,8 @@ Objective Parameters ...@@ -698,6 +700,8 @@ Objective Parameters
- weight of labels with positive class - weight of labels with positive class
- **Note**: while enabling this should increase the overall performance metric of your model, it will also result in poor estimates of the individual class probabilities
- **Note**: this parameter cannot be used at the same time with ``is_unbalance``, choose only **one** of them - **Note**: this parameter cannot be used at the same time with ``is_unbalance``, choose only **one** of them
- ``sigmoid`` :raw-html:`<a id="sigmoid" title="Permalink to this parameter" href="#sigmoid">&#x1F517;&#xFE0E;</a>`, default = ``1.0``, type = double, constraints: ``sigmoid > 0.0`` - ``sigmoid`` :raw-html:`<a id="sigmoid" title="Permalink to this parameter" href="#sigmoid">&#x1F517;&#xFE0E;</a>`, default = ``1.0``, type = double, constraints: ``sigmoid > 0.0``
......
...@@ -631,12 +631,14 @@ struct Config { ...@@ -631,12 +631,14 @@ struct Config {
// alias = unbalance, unbalanced_sets // alias = unbalance, unbalanced_sets
// desc = used only in ``binary`` application // desc = used only in ``binary`` application
// desc = set this to ``true`` if training data are unbalanced // desc = set this to ``true`` if training data are unbalanced
// desc = **Note**: while enabling this should increase the overall performance metric of your model, it will also result in poor estimates of the individual class probabilities
// desc = **Note**: this parameter cannot be used at the same time with ``scale_pos_weight``, choose only **one** of them // desc = **Note**: this parameter cannot be used at the same time with ``scale_pos_weight``, choose only **one** of them
bool is_unbalance = false; bool is_unbalance = false;
// check = >0.0 // check = >0.0
// desc = used only in ``binary`` application // desc = used only in ``binary`` application
// desc = weight of labels with positive class // desc = weight of labels with positive class
// desc = **Note**: while enabling this should increase the overall performance metric of your model, it will also result in poor estimates of the individual class probabilities
// desc = **Note**: this parameter cannot be used at the same time with ``is_unbalance``, choose only **one** of them // desc = **Note**: this parameter cannot be used at the same time with ``is_unbalance``, choose only **one** of them
double scale_pos_weight = 1.0; double scale_pos_weight = 1.0;
......
...@@ -170,6 +170,9 @@ class LGBMModel(_LGBMModelBase): ...@@ -170,6 +170,9 @@ class LGBMModel(_LGBMModelBase):
Weights associated with classes in the form ``{class_label: weight}``. Weights associated with classes in the form ``{class_label: weight}``.
Use this parameter only for multi-class classification task; Use this parameter only for multi-class classification task;
for binary classification task you may use ``is_unbalance`` or ``scale_pos_weight`` parameters. for binary classification task you may use ``is_unbalance`` or ``scale_pos_weight`` parameters.
Note, that the usage of all these parameters will result in poor estimates of the individual class probabilities.
You may want to consider performing probability calibration
(https://scikit-learn.org/stable/modules/calibration.html) of your model.
The 'balanced' mode uses the values of y to automatically adjust weights The 'balanced' mode uses the values of y to automatically adjust weights
inversely proportional to class frequencies in the input data as ``n_samples / (n_classes * np.bincount(y))``. inversely proportional to class frequencies in the input data as ``n_samples / (n_classes * np.bincount(y))``.
If None, all classes are supposed to have weight one. If None, all classes are supposed to have weight one.
......
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