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: docs/examples.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ You can see that the innovation signal captures the instances where the BOLD res
127
127
128
128
## What do AUC time series look like?
129
129
130
-
To avoid the selection of the regularization parameter, we can use the Stability Selection method. This method is based on subsampling the data and solving the regularization path for each subsample a number of times. You can think of it as a cross-validation approach. The method then calculates the probability of every time point having a non-zero coefficient. The following code snippet shows how to use the Stability Selection method:
130
+
To avoid having to select the regularization parameter manually, we can use the Stability Selection method. This method works by subsampling the data multiple times and solving the regularization path for each subsample. You can think of it as a cross-validation approach. This process provides a snapshot of which time points are selected more frequently. For each value of lambda, the method calculates the probability that every time point has a non-zero coefficient, based on how often it is selected across all runs. These probability curves (one per time point) are then used to calculate the area under the curve (AUC). The AUC serves as a proxy for how likely a time point is to have a non-zero coefficient across all possible lambdas, and therefore to be truly non-zero. The following code snippet shows how to use the Stability Selection method:
131
131
132
132
```python
133
133
from pySPFM.deconvolution.hrf_generator import HRFMatrix
@@ -147,7 +147,7 @@ The AUC time series for the spike model is shown below:
By definition, the AUC time series cannot have zero values. However, that will only happen if the entire space of the regularization path is explored; i.e., if all the regularization parameters are considered. This means that we still have to apply a threshold to the AUC time series to obtain the final estimates. One way to do this is to select a region of the brain where you do not expect to see any activity, like the deep white matter. You can then use the 95th percentile of the AUC time series in that region as a threshold.
150
+
By definition, the AUC time series cannot have zero values. However, that will only happen if the entire space of the regularization path is explored; i.e., if all the regularization parameters are considered. This means that we still have to apply a threshold to the AUC time series to obtain the final estimates. One way to do this is to select a region of the brain where you do not expect to see any activity, like the deep white matter. Assuming you have run stability selection throughout the brain, you can calculate the histogram of AUC values in the deep white matter (you can just erode the white matter mask to make it deep enough). You can then use the 95th percentile (or 99th, depending on how strict or sparse you want your estimates to be) of this histogram as a threshold throughout the brain.
151
151
152
152
Here is what the thresholded AUC time series would look like if we thresholded the AUC time series above with a 0.15 threshold:
0 commit comments