From 9e86da60ee0d5c466c8a2435b8da258dc5e92a40 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Wed, 28 Sep 2016 17:23:13 +0200 Subject: [PATCH] DOC: Update Cookbook wirth new modes --- .../Cookbook/rst/recipes/pbclassif.rst | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Documentation/Cookbook/rst/recipes/pbclassif.rst b/Documentation/Cookbook/rst/recipes/pbclassif.rst index e3d6755b25..4c1f35e791 100644 --- a/Documentation/Cookbook/rst/recipes/pbclassif.rst +++ b/Documentation/Cookbook/rst/recipes/pbclassif.rst @@ -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 -- GitLab