|
13 | 13 | $$ |
14 | 14 |
|
15 | 15 | where $S_{y_i} \subseteq D_{y_i} \setminus \{i\}$ and $S_{-y_i} \subseteq |
16 | | -D_{-y_i}$. In practice, this quantity is estimated using Monte Carlo sampling of |
17 | | -the powerset and the set of index permutations. Applying these techniques |
18 | | -results in the estimator |
| 16 | +D_{-y_i}$. |
| 17 | +
|
| 18 | +!!! tip "Analysis of Class-wise Shapley" |
| 19 | + For a detailed analysis of the method, with comparison to other valuation |
| 20 | + techniques, please refer to the [main |
| 21 | + documentation](../../../../../value/classwise-shapley). |
| 22 | +
|
| 23 | +In practice, the quantity above is estimated using Monte Carlo sampling of |
| 24 | +the powerset and the set of index permutations. This results in the estimator |
19 | 25 |
|
20 | 26 | $$ |
21 | 27 | v_u(i) = \frac{1}{K} \sum_k \frac{1}{L} \sum_l |
@@ -110,27 +116,28 @@ class ClasswiseScorer(Scorer): |
110 | 116 | !!! warning Multi-class support |
111 | 117 | Metrics must support multiple class labels if you intend to apply them |
112 | 118 | to a multi-class problem. For instance, the metric 'accuracy' supports |
113 | | - multiple classes, but the metric 'f1' does not. For a two-class |
114 | | - classification problem, using 'f1_weighted' is essentially equivalent to |
115 | | - using 'accuracy'. |
| 119 | + multiple classes, but the metric `f1` does not. For a two-class |
| 120 | + classification problem, using `f1_weighted` is essentially equivalent to |
| 121 | + using `accuracy`. |
116 | 122 |
|
117 | 123 | Args: |
118 | 124 | scoring: Name of the scoring function or a callable that can be passed |
119 | 125 | to [Scorer][pydvl.utils.score.Scorer]. |
120 | 126 | default: Score to use when a model fails to provide a number, e.g. when |
121 | 127 | too little was used to train it, or errors arise. |
122 | | - range: Numerical range of the score function. Some Monte Carlo methods can |
123 | | - use this to estimate the number of samples required for a certain quality of |
124 | | - approximation. If not provided, it can be read from the `scoring` object |
125 | | - if it provides it, for instance if it was constructed with |
| 128 | + range: Numerical range of the score function. Some Monte Carlo methods |
| 129 | + can use this to estimate the number of samples required for a |
| 130 | + certain quality of approximation. If not provided, it can be read |
| 131 | + from the `scoring` object if it provides it, for instance if it was |
| 132 | + constructed with |
126 | 133 | [compose_score][pydvl.utils.score.compose_score]. |
127 | 134 | in_class_discount_fn: Continuous, monotonic increasing function used to |
128 | 135 | discount the in-class score. |
129 | | - out_of_class_discount_fn: Continuous, monotonic increasing function used to |
130 | | - discount the out-of-class score. |
| 136 | + out_of_class_discount_fn: Continuous, monotonic increasing function used |
| 137 | + to discount the out-of-class score. |
131 | 138 | initial_label: Set initial label (for the first iteration) |
132 | 139 | name: Name of the scorer. If not provided, the name of the inner scoring |
133 | | - function will be prefixed by 'classwise '. |
| 140 | + function will be prefixed by `classwise `. |
134 | 141 |
|
135 | 142 | !!! tip "New in version 0.7.1" |
136 | 143 | """ |
|
0 commit comments