Skip to content
Snippets Groups Projects
Commit 9e86da60 authored by Julien Michel's avatar Julien Michel
Browse files

DOC: Update Cookbook wirth new modes

parent 837a4716
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,13 @@ There are several strategies to compute those sampling rates:
of samples, which is user-defined.
* **Smallest class strategy:** The class with the least number of samples
will be fully sampled. All other classes will be sampled with the
same number of samples.
same number of samples.
* **Percent strategy:** Each class will be sampled with a user-defined
percentage (same value for all classes) of samples available in this
class.
* **Total strategy:** A global number of samples to generate is
divided proportionally among each class (classes proportions are
enforced).
* **Take all strategy:** Take all the available samples
* **By class strategy:** Set a target number of samples for each
class. The number of samples for each class is read from a CSV file.
......@@ -246,7 +252,23 @@ image.
- *Mode = custom:* For each image :math:`i` and each class :math:`c`,
:math:`Ni( c ) = M_i(c)` where :math:`M_i(c)` is the custom requested number of
samples for each image :math:`i` and each class :math:`c`
* **Strategy = percent**
- *Mode = proportional:* For each image :math:`i` and each class :math:`c`,
:math:`N_i( c ) = p * T_i(c)` where :math:`p` is the user-defined percentage
- *Mode = equal:* For each image :math:`i` and each class :math:`c`,
:math:`N_i( c ) = p * sum_k(Tk(c)]/L` where :math:`p` is the user-defined percentage
- *Mode = custom:* For each image :math:`i` and each class :math:`c`,
:math:`Ni( c ) = p(i) * T_i(c)` where :math:`p(i)` is the user-defined percentage for image :math:`i`
* **Strategy = total**
- *Mode = proportional:* For each image :math:`i` and each class :math:`c`,
:math:`N_i( c ) = total * (sum_k(Ti(k))/sum_kl(Tl(k))) * (Ti(c)/sum_k(Ti(k)))` where :math:`total` is the total number of samples specified
- *Mode = equal:* For each image :math:`i` and each class :math:`c`,
:math:`N_i( c ) = (total / L) * (Ti(c)/sum_k(Ti(k)))` where :math:`total` is the total number of samples specified
- *Mode = custom:* For each image :math:`i` and each class :math:`c`,
:math:`Ni( c ) = total(i) * (Ti(c)/sum_k(Ti(k)))` where :math:`total(i)` is the total number of samples specified for image :math:`i`
* **Strategy = smallest class**
- *Mode = proportional:* the smallest class is computed globally, then this smallest size is used for the strategy constant+proportional
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment