Skip to content

Commit 6ef6105

Browse files
committed
More link fixes in glossary
1 parent a23b446 commit 6ef6105

File tree

6 files changed

+26
-24
lines changed

6 files changed

+26
-24
lines changed

docs/getting-started/glossary.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Terms in data valuation and influence functions:
1313

1414
The Arnoldi method approximately computes eigenvalue, eigenvector pairs of
1515
a symmetric matrix. For influence functions, it is used to approximate
16-
the [iHVP][glossary-inverse-hessian-vector-product].
16+
the [iHVP][glossary-iHVP].
1717
Introduced by [@schioppa_scaling_2022] in the context of influence functions.
1818

1919
* [Implementation (torch)
@@ -24,7 +24,7 @@ Introduced by [@schioppa_scaling_2022] in the context of influence functions.
2424

2525
A blocked version of [CG][glossary-conjugate-gradient], which solves several linear
2626
systems simultaneously. For Influence Functions, it is used to
27-
approximate the [iHVP][glossary-inverse-hessian-vector-product].
27+
approximate the [iHVP][glossary-iHVP].
2828

2929
* [Implementation (torch)
3030
][pydvl.influence.torch.influence_function_model.CgInfluence]
@@ -47,7 +47,7 @@ Introduced by [@schoch_csshapley_2022].
4747

4848
CG is an algorithm for solving linear systems with a symmetric and
4949
positive-definite coefficient matrix. For Influence Functions, it is used to
50-
approximate the [iHVP][glossary-inverse-hessian-vector-product].
50+
approximate the [iHVP][glossary-iHVP].
5151

5252
* [Implementation
5353
(torch)][pydvl.influence.torch.influence_function_model.CgInfluence]
@@ -80,14 +80,14 @@ Introduced by [@wang_improving_2022].
8080

8181
### Eigenvalue-corrected Kronecker-Factored Approximate Curvature
8282

83-
EKFAC builds on [K-FAC][glossary-kronecker-factored-approximate-curvature] by
84-
correcting for the approximation errors in the eigenvalues of the blocks of the
85-
Kronecker-factored approximate curvature matrix. This correction aims to refine
86-
the accuracy of natural gradient approximations, thus potentially offering
87-
better training efficiency and stability in neural networks.
83+
EKFAC builds on [K-FAC][flossary-k-fac] by correcting for the approximation
84+
errors in the eigenvalues of the blocks of the Kronecker-factored approximate
85+
curvature matrix. This correction aims to refine the accuracy of natural
86+
gradient approximations, thus potentially offering better training efficiency
87+
and stability in neural networks.
8888

89-
* [Implementation (torch)
90-
][pydvl.influence.torch.influence_function_model.EkfacInfluence]
89+
* [Implementation
90+
(torch)][pydvl.influence.torch.influence_function_model.EkfacInfluence]
9191
* [Documentation (torch)][eigenvalue-corrected-k-fac]
9292

9393

@@ -142,7 +142,7 @@ LiSSA is an efficient algorithm for approximating the inverse Hessian-vector
142142
product, enabling faster computations in large-scale machine learning
143143
problems, particularly for second-order optimization.
144144
For Influence Functions, it is used to
145-
approximate the [iHVP][glossary-inverse-hessian-vector-product].
145+
approximate the [iHVP][glossary-iHVP].
146146
Introduced by [@agarwal_secondorder_2017].
147147

148148
* [Implementation (torch)
@@ -196,7 +196,7 @@ Introduced into data valuation by [@ghorbani_data_2019].
196196

197197
The Nyström approximation computes a low-rank approximation to a symmetric
198198
positive-definite matrix via random projections. For influence functions,
199-
it is used to approximate the [iHVP][glossary-inverse-hessian-vector-product].
199+
it is used to approximate the [iHVP][glossary-iHVP].
200200
Introduced as sketch and solve algorithm in [@hataya_nystrom_2023], and as
201201
preconditioner for [PCG][glossary-preconditioned-conjugate-gradient] in
202202
[@frangella_randomized_2023].
@@ -220,7 +220,7 @@ performance, where the points are removed in order of their value. See
220220

221221
A blocked version of [PCG][glossary-preconditioned-conjugate-gradient], which solves
222222
several linear systems simultaneously. For Influence Functions, it is used to
223-
approximate the [iHVP][glossary-inverse-hessian-vector-product].
223+
approximate the [iHVP][glossary-iHVP].
224224

225225
* [Implementation CG (torch)
226226
][pydvl.influence.torch.influence_function_model.CgInfluence]
@@ -233,7 +233,7 @@ approximate the [iHVP][glossary-inverse-hessian-vector-product].
233233
A preconditioned version of [CG][glossary-conjugate-gradient] for improved
234234
convergence, depending on the characteristics of the matrix and the
235235
preconditioner. For Influence Functions, it is used to
236-
approximate the [iHVP][glossary-inverse-hessian-vector-product].
236+
approximate the [iHVP][glossary-iHVP].
237237

238238
* [Implementation CG (torch)
239239
][pydvl.influence.torch.influence_function_model.CgInfluence]

notebooks/data_oob.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@
271271
]
272272
},
273273
{
274-
"metadata": {},
275274
"cell_type": "markdown",
275+
"metadata": {},
276276
"source": [
277277
"## Computing the OOB values\n",
278278
"\n",
@@ -284,10 +284,10 @@
284284
]
285285
},
286286
{
287-
"metadata": {},
288287
"cell_type": "code",
289-
"outputs": [],
290288
"execution_count": null,
289+
"metadata": {},
290+
"outputs": [],
291291
"source": [
292292
"n_estimators = [50, 100, 200]\n",
293293
"oob_values = []\n",

notebooks/shapley_basic_spotify.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,19 +442,19 @@
442442
]
443443
},
444444
{
445-
"metadata": {},
446445
"cell_type": "markdown",
446+
"metadata": {},
447447
"source": [
448448
"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",
449449
"\n",
450450
"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."
451451
]
452452
},
453453
{
454-
"metadata": {},
455454
"cell_type": "code",
456-
"outputs": [],
457455
"execution_count": null,
456+
"metadata": {},
457+
"outputs": [],
458458
"source": [
459459
"from joblib import parallel_config\n",
460460
"\n",

notebooks/shapley_knn_flowers.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181
"cell_type": "markdown",
8282
"id": "75abb359",
8383
"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]."
86+
]
8587
},
8688
{
8789
"cell_type": "markdown",

src/pydvl/valuation/methods/data_oob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(
7979
self.score = score
8080

8181
def fit(self, data: Dataset) -> Self:
82-
""" Compute the Data-OOB values.
82+
"""Compute the Data-OOB values.
8383
8484
This requires the bagging model passed upon construction to be fitted.
8585

src/pydvl/value/shapley/classwise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
!!! tip "Analysis of Class-wise Shapley"
1919
For a detailed analysis of the method, with comparison to other valuation
20-
techniques, please refer to the [main documentation][class-wise-shapley].
20+
techniques, please refer to the [main documentation][intro-to-cw-shapley].
2121
2222
In practice, the quantity above is estimated using Monte Carlo sampling of
2323
the powerset and the set of index permutations. This results in the estimator
@@ -269,7 +269,7 @@ def compute_classwise_shapley_values(
269269
270270
where $\sigma_{:i}$ denotes the set of indices in permutation sigma before
271271
the position where $i$ appears and $S$ is a subset of the index set of all
272-
other labels (see [the main documentation][class-wise-shapley] for
272+
other labels (see [the main documentation][#intro-to-cw-shapley] for
273273
details).
274274
275275
Args:

0 commit comments

Comments
 (0)