Graph Total Variation (Huber)¶
Solver ID: TV
Usage¶
from invert import Solver
# fwd = ... (mne.Forward object)
# evoked = ... (mne.Evoked object)
solver = Solver("TV")
solver.make_inverse_operator(fwd)
stc = solver.apply_inverse_operator(evoked)
stc.plot()
Overview¶
Iteratively reweighted graph-TV (edge-preserving) regularizer on the source-space mesh adjacency.
References¶
- Rudin, L. I., Osher, S., & Fatemi, E. (1992). Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena, 60(1–4), 259–268.
- Huber, P. J. (1964). Robust estimation of a location parameter. The Annals of Mathematical Statistics, 35(1), 73–101.
API Reference¶
Bases: BaseSolver
Edge-preserving structured regularization via (Huber) graph total variation.
Uses an iteratively reweighted quadratic approximation of a graph TV penalty on the source-space adjacency. Each IRLS step solves a symmetric positive definite linear system via conjugate gradients in implicit form.
Source code in invert/solvers/minimum_norm/total_variation.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
__init__ ¶
__init__(
name: str = "Total Variation",
default_tv_weight: float = 0.01,
default_ridge: float | None = None,
default_n_irls: int = 8,
default_eps: float = 0.001,
default_cg_tol: float = 0.0001,
default_cg_max_iter: int = 200,
auto_scale_hyperparams: bool = True,
**kwargs: Any,
) -> None
Source code in invert/solvers/minimum_norm/total_variation.py
make_inverse_operator ¶
make_inverse_operator(
forward,
*args: Any,
alpha: str | float = "auto",
noise_cov: Covariance | None = None,
**kwargs: Any,
)
Source code in invert/solvers/minimum_norm/total_variation.py
apply_inverse_operator ¶
apply_inverse_operator(
mne_obj,
tv_weight: float | None = None,
n_irls: int | None = None,
eps: float | None = None,
ridge: float | None = None,
cg_tol: float | None = None,
cg_max_iter: int | None = None,
auto_scale_hyperparams: bool | None = None,
)
Source code in invert/solvers/minimum_norm/total_variation.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |