You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notebooks/shapley_basic_spotify.ipynb
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -442,19 +442,19 @@
442
442
]
443
443
},
444
444
{
445
-
"metadata": {},
446
445
"cell_type": "markdown",
446
+
"metadata": {},
447
447
"source": [
448
448
"Now we configure the valuation method. Shapley values were popularized for data valuation in machine learning with _Truncated Monte Carlo Shapley_, which is a Monte Carlo approximation of the Shapley value that uses a permutation-based definition of Shapley values and truncates the iteration over a given permutation after the marginal utility drops below a certain threshold. For more information on the method, see [Ghorbani and Zou (2019)](https://proceedings.mlr.press/v97/ghorbani19c.html) or [pydvl's documentation][pydvl.valuation.methods.shapley.ShapleyValuation].\n",
449
449
"\n",
450
450
"Like every semi-value method, `ShapleyValuation` requires a sampler and a stopping criterion. For the former we use a [PermutationSampler][pydvl.valuation.samplers.permutation.PermutationSampler], which samples permutations of indices and computes marginal contributions incrementally. By using [RelativeTruncation][pydvl.valuation.samplers.truncation.RelativeTruncation], the processing of a permutation will stop once the utility of a subset is close to the total utility. Finally, the stopping condition for the whole algorithm is given as in the TMCS paper: we stop once the total change in the last 100 steps is below a threshold."
Copy file name to clipboardExpand all lines: notebooks/shapley_knn_flowers.ipynb
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,9 @@
81
81
"cell_type": "markdown",
82
82
"id": "75abb359",
83
83
"metadata": {},
84
-
"source": "The main interface is the class [KNNShapleyValuation][pydvl.valuation.methods.knn_shapley.KNNShapleyValuation]. In order to use it we need to construct two [Datasets][pydvl.valuation.dataset.Dataset] (one for training and one for evaluating), and a [KNNClassifierUtility][pydvl.valuation.utility.knn.KNNClassifierUtility]."
84
+
"source": [
85
+
"The main interface is the class [KNNShapleyValuation][pydvl.valuation.methods.knn_shapley.KNNShapleyValuation]. In order to use it we need to construct two [Datasets][pydvl.valuation.dataset.Dataset] (one for training and one for evaluating), and a [KNNClassifierUtility][pydvl.valuation.utility.knn.KNNClassifierUtility]."
0 commit comments