Skip to content

Commit

Permalink
Modifed the example
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelkusch committed Feb 20, 2025
1 parent a647319 commit 59df1ca
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions examples/plot_fmri_data_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
from sklearn.linear_model import Ridge
from sklearn.svm import LinearSVR
from sklearn.utils import Bunch
from sklearn.model_selection import GridSearchCV
from sklearn.svm import LinearSVR

from hidimstat.ada_svr import ada_svr
from hidimstat.clustered_inference import clustered_inference
Expand Down Expand Up @@ -141,13 +139,10 @@ def preprocess_haxby(subject=2, memory=None):
# First, we try to recover the discriminative partern by computing
# p-values from SVR decoder weights and a parametric approximation
# of the distribution of these weights.

# We precomputed the regularization parameter by CV (C = 0.1) to reduce the
# computation time of the example.
beta_hat, scale = empirical_thresholding(
X,
y,
linear_estimator=GridSearchCV(LinearSVR(), param_grid={"C": [0.1]}, n_jobs=None),
linear_estimator=LinearSVR(),
)
pval_std_svr, _, one_minus_pval_std_svr, _ = pval_from_scale(beta_hat, scale)

Expand Down Expand Up @@ -323,4 +318,4 @@ def plot_map(
# (EnCluDL) seems realistic as we recover the visual cortex and do not make
# spurious discoveries.

# show()
show()

0 comments on commit 59df1ca

Please sign in to comment.