diff --git a/docs/_downloads/06bb0f682e15138dfd659b791a14e9c6/plot_variable_importance_classif.zip b/docs/_downloads/06bb0f682e15138dfd659b791a14e9c6/plot_variable_importance_classif.zip index a29ba15..c6c28aa 100644 Binary files a/docs/_downloads/06bb0f682e15138dfd659b791a14e9c6/plot_variable_importance_classif.zip and b/docs/_downloads/06bb0f682e15138dfd659b791a14e9c6/plot_variable_importance_classif.zip differ diff --git a/docs/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip b/docs/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip index f17e32f..791cda9 100644 Binary files a/docs/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip and b/docs/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip differ diff --git a/docs/_downloads/117422582fb46cc8ed6549598a2d87de/plot_dcrt_example.zip b/docs/_downloads/117422582fb46cc8ed6549598a2d87de/plot_dcrt_example.zip index 3b73f38..4336aec 100644 Binary files a/docs/_downloads/117422582fb46cc8ed6549598a2d87de/plot_dcrt_example.zip and b/docs/_downloads/117422582fb46cc8ed6549598a2d87de/plot_dcrt_example.zip differ diff --git a/docs/_downloads/1a99dc8cb1c22f91072d67cf26fce26c/plot_knockoff_aggregation.zip b/docs/_downloads/1a99dc8cb1c22f91072d67cf26fce26c/plot_knockoff_aggregation.zip index 84ad1c1..6adfd9f 100644 Binary files a/docs/_downloads/1a99dc8cb1c22f91072d67cf26fce26c/plot_knockoff_aggregation.zip and b/docs/_downloads/1a99dc8cb1c22f91072d67cf26fce26c/plot_knockoff_aggregation.zip differ diff --git a/docs/_downloads/5ca231767268e6cd969e65225d673650/plot_fmri_data_example.zip b/docs/_downloads/5ca231767268e6cd969e65225d673650/plot_fmri_data_example.zip index 598f0b9..3e37f1f 100644 Binary files a/docs/_downloads/5ca231767268e6cd969e65225d673650/plot_fmri_data_example.zip and b/docs/_downloads/5ca231767268e6cd969e65225d673650/plot_fmri_data_example.zip differ diff --git a/docs/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip b/docs/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip index 7df92ca..cbca6b4 100644 Binary files a/docs/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip and b/docs/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip differ diff --git a/docs/_downloads/707d94040f5ada342e781499193f46f1/plot_diabetes_variable_importance_example.zip b/docs/_downloads/707d94040f5ada342e781499193f46f1/plot_diabetes_variable_importance_example.zip index 3a2f3aa..d17b796 100644 Binary files a/docs/_downloads/707d94040f5ada342e781499193f46f1/plot_diabetes_variable_importance_example.zip and b/docs/_downloads/707d94040f5ada342e781499193f46f1/plot_diabetes_variable_importance_example.zip differ diff --git a/docs/_downloads/76c0979bf6618aa210fd11bb28dcf896/plot_fmri_data_example.py b/docs/_downloads/76c0979bf6618aa210fd11bb28dcf896/plot_fmri_data_example.py index 92c6936..68c696a 100644 --- a/docs/_downloads/76c0979bf6618aa210fd11bb28dcf896/plot_fmri_data_example.py +++ b/docs/_downloads/76c0979bf6618aa210fd11bb28dcf896/plot_fmri_data_example.py @@ -55,7 +55,7 @@ from sklearn.svm import LinearSVR from sklearn.utils import Bunch -from hidimstat.ada_svr import ada_svr +from hidimstat.adaptative_permutation_threshold_SVR import ada_svr from hidimstat.clustered_inference import clustered_inference from hidimstat.ensemble_clustered_inference import ensemble_clustered_inference from hidimstat.permutation_test import permutation_test, permutation_test_pval diff --git a/docs/_downloads/931385a6992917f918857d6a3ee9f780/plot_fmri_data_example.ipynb b/docs/_downloads/931385a6992917f918857d6a3ee9f780/plot_fmri_data_example.ipynb index bee59e0..9630b96 100644 --- a/docs/_downloads/931385a6992917f918857d6a3ee9f780/plot_fmri_data_example.ipynb +++ b/docs/_downloads/931385a6992917f918857d6a3ee9f780/plot_fmri_data_example.ipynb @@ -22,7 +22,7 @@ }, "outputs": [], "source": [ - "import numpy as np\nimport pandas as pd\nfrom nilearn import datasets\nfrom nilearn.image import mean_img\nfrom nilearn.input_data import NiftiMasker\nfrom nilearn.plotting import plot_stat_map, show\nfrom sklearn.cluster import FeatureAgglomeration\nfrom sklearn.feature_extraction import image\nfrom sklearn.linear_model import Ridge\nfrom sklearn.svm import LinearSVR\nfrom sklearn.utils import Bunch\n\nfrom hidimstat.ada_svr import ada_svr\nfrom hidimstat.clustered_inference import clustered_inference\nfrom hidimstat.ensemble_clustered_inference import ensemble_clustered_inference\nfrom hidimstat.permutation_test import permutation_test, permutation_test_pval\nfrom hidimstat.standardized_svr import standardized_svr\nfrom hidimstat.stat_tools import pval_from_scale, zscore_from_pval\n\nn_job = None" + "import numpy as np\nimport pandas as pd\nfrom nilearn import datasets\nfrom nilearn.image import mean_img\nfrom nilearn.input_data import NiftiMasker\nfrom nilearn.plotting import plot_stat_map, show\nfrom sklearn.cluster import FeatureAgglomeration\nfrom sklearn.feature_extraction import image\nfrom sklearn.linear_model import Ridge\nfrom sklearn.svm import LinearSVR\nfrom sklearn.utils import Bunch\n\nfrom hidimstat.adaptative_permutation_threshold_SVR import ada_svr\nfrom hidimstat.clustered_inference import clustered_inference\nfrom hidimstat.ensemble_clustered_inference import ensemble_clustered_inference\nfrom hidimstat.permutation_test import permutation_test, permutation_test_pval\nfrom hidimstat.standardized_svr import standardized_svr\nfrom hidimstat.stat_tools import pval_from_scale, zscore_from_pval\n\nn_job = None" ] }, { diff --git a/docs/_downloads/e08c0f6d4aade0f0eaf8ba56dbbfd9c9/plot_2D_simulation_example.zip b/docs/_downloads/e08c0f6d4aade0f0eaf8ba56dbbfd9c9/plot_2D_simulation_example.zip index c6638cb..0de36ef 100644 Binary files a/docs/_downloads/e08c0f6d4aade0f0eaf8ba56dbbfd9c9/plot_2D_simulation_example.zip and b/docs/_downloads/e08c0f6d4aade0f0eaf8ba56dbbfd9c9/plot_2D_simulation_example.zip differ diff --git a/docs/_sources/api.rst.txt b/docs/_sources/api.rst.txt index 1393744..84be6a2 100644 --- a/docs/_sources/api.rst.txt +++ b/docs/_sources/api.rst.txt @@ -15,7 +15,6 @@ Functions .. autosummary:: :toctree: generated/ - ada_svr aggregate_quantiles clustered_inference data_simulation diff --git a/docs/_sources/auto_examples/index.rst.txt b/docs/_sources/auto_examples/index.rst.txt index b5e3be9..f6e4e93 100644 --- a/docs/_sources/auto_examples/index.rst.txt +++ b/docs/_sources/auto_examples/index.rst.txt @@ -87,35 +87,35 @@ Examples Gallery .. raw:: html -
+
.. only:: html - .. image:: /auto_examples/images/thumb/sphx_glr_plot_fmri_data_example_thumb.png + .. image:: /auto_examples/images/thumb/sphx_glr_plot_variable_importance_classif_thumb.png :alt: - :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` + :ref:`sphx_glr_auto_examples_plot_variable_importance_classif.py` .. raw:: html -
Support recovery on fMRI data
+
Measuring variable importance in classification
.. raw:: html -
+
.. only:: html - .. image:: /auto_examples/images/thumb/sphx_glr_plot_variable_importance_classif_thumb.png + .. image:: /auto_examples/images/thumb/sphx_glr_plot_fmri_data_example_thumb.png :alt: - :ref:`sphx_glr_auto_examples_plot_variable_importance_classif.py` + :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` .. raw:: html -
Measuring variable importance in classification
+
Support recovery on fMRI data
@@ -133,8 +133,8 @@ Examples Gallery /auto_examples/plot_knockoff_aggregation /auto_examples/plot_diabetes_variable_importance_example /auto_examples/plot_2D_simulation_example - /auto_examples/plot_fmri_data_example /auto_examples/plot_variable_importance_classif + /auto_examples/plot_fmri_data_example .. only:: html diff --git a/docs/_sources/auto_examples/plot_2D_simulation_example.rst.txt b/docs/_sources/auto_examples/plot_2D_simulation_example.rst.txt index 9ee5c5e..da7571b 100644 --- a/docs/_sources/auto_examples/plot_2D_simulation_example.rst.txt +++ b/docs/_sources/auto_examples/plot_2D_simulation_example.rst.txt @@ -554,7 +554,7 @@ randomization. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (1 minutes 5.593 seconds) + **Total running time of the script:** (1 minutes 5.804 seconds) **Estimated memory usage:** 722 MB diff --git a/docs/_sources/auto_examples/plot_dcrt_example.rst.txt b/docs/_sources/auto_examples/plot_dcrt_example.rst.txt index 8b44d8c..ef00f2f 100644 --- a/docs/_sources/auto_examples/plot_dcrt_example.rst.txt +++ b/docs/_sources/auto_examples/plot_dcrt_example.rst.txt @@ -162,7 +162,7 @@ Plotting the comparison .. rst-class:: sphx-glr-timing - **Total running time of the script:** (1 minutes 2.729 seconds) + **Total running time of the script:** (1 minutes 2.893 seconds) **Estimated memory usage:** 658 MB diff --git a/docs/_sources/auto_examples/plot_diabetes_variable_importance_example.rst.txt b/docs/_sources/auto_examples/plot_diabetes_variable_importance_example.rst.txt index b615aed..1cccd4b 100644 --- a/docs/_sources/auto_examples/plot_diabetes_variable_importance_example.rst.txt +++ b/docs/_sources/auto_examples/plot_diabetes_variable_importance_example.rst.txt @@ -491,7 +491,7 @@ Analyze the results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 8.186 seconds) + **Total running time of the script:** (0 minutes 8.329 seconds) **Estimated memory usage:** 643 MB diff --git a/docs/_sources/auto_examples/plot_fmri_data_example.rst.txt b/docs/_sources/auto_examples/plot_fmri_data_example.rst.txt index d491921..1868a60 100644 --- a/docs/_sources/auto_examples/plot_fmri_data_example.rst.txt +++ b/docs/_sources/auto_examples/plot_fmri_data_example.rst.txt @@ -79,7 +79,7 @@ Imports needed for this script from sklearn.svm import LinearSVR from sklearn.utils import Bunch - from hidimstat.ada_svr import ada_svr + from hidimstat.adaptative_permutation_threshold_SVR import ada_svr from hidimstat.clustered_inference import clustered_inference from hidimstat.ensemble_clustered_inference import ensemble_clustered_inference from hidimstat.permutation_test import permutation_test, permutation_test_pval @@ -179,15 +179,25 @@ You may choose a subject in [1, 2, 3, 4, 5, 6]. By default subject=2. [_add_readme_to_default_data_locations] Added README.md to /home/runner/nilearn_data [get_dataset_dir] Dataset created in /home/runner/nilearn_data/haxby2001 [fetch_single_file] Downloading data from https://www.nitrc.org/frs/download.php/7868/mask.nii.gz ... - [fetch_single_file] ...done. (0 seconds, 0 min) + [fetch_single_file] ...done. (1 seconds, 0 min) [fetch_single_file] Downloading data from http://data.pymvpa.org/datasets/haxby2001/MD5SUMS ... [fetch_single_file] ...done. (0 seconds, 0 min) [fetch_single_file] Downloading data from http://data.pymvpa.org/datasets/haxby2001/subj2-2010.01.14.tar.gz ... - [_chunk_report_] Downloaded 94011392 of 291168628 bytes (32.3%%, 2.1s remaining) - [_chunk_report_] Downloaded 212819968 of 291168628 bytes (73.1%%, 0.7s remaining) - [fetch_single_file] ...done. (3 seconds, 0 min) + [_chunk_report_] Downloaded 15261696 of 291168628 bytes (5.2%%, 18.2s remaining) + [_chunk_report_] Downloaded 53190656 of 291168628 bytes (18.3%%, 9.1s remaining) + [_chunk_report_] Downloaded 91701248 of 291168628 bytes (31.5%%, 6.6s remaining) + [_chunk_report_] Downloaded 129933312 of 291168628 bytes (44.6%%, 5.0s remaining) + [_chunk_report_] Downloaded 156491776 of 291168628 bytes (53.7%%, 4.4s remaining) + [_chunk_report_] Downloaded 178135040 of 291168628 bytes (61.2%%, 3.9s remaining) + [_chunk_report_] Downloaded 196550656 of 291168628 bytes (67.5%%, 3.4s remaining) + [_chunk_report_] Downloaded 213925888 of 291168628 bytes (73.5%%, 2.9s remaining) + [_chunk_report_] Downloaded 232153088 of 291168628 bytes (79.7%%, 2.3s remaining) + [_chunk_report_] Downloaded 250953728 of 291168628 bytes (86.2%%, 1.6s remaining) + [_chunk_report_] Downloaded 270131200 of 291168628 bytes (92.8%%, 0.9s remaining) + [_chunk_report_] Downloaded 289538048 of 291168628 bytes (99.4%%, 0.1s remaining) + [fetch_single_file] ...done. (12 seconds, 0 min) [uncompress_file] Extracting data from /home/runner/nilearn_data/haxby2001/9cabe068089e791ef0c5fe930fc20e30/subj2-2010.01.14.tar.gz... [uncompress_file] .. done. @@ -375,7 +385,7 @@ However you might benefit from clustering randomization taking .. code-block:: none [Parallel(n_jobs=2)]: Using backend LokyBackend with 2 concurrent workers. - [Parallel(n_jobs=2)]: Done 5 out of 5 | elapsed: 32.0s finished + [Parallel(n_jobs=2)]: Done 5 out of 5 | elapsed: 34.1s finished @@ -620,9 +630,9 @@ spurious discoveries. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (1 minutes 23.795 seconds) + **Total running time of the script:** (1 minutes 37.697 seconds) -**Estimated memory usage:** 3287 MB +**Estimated memory usage:** 3398 MB .. _sphx_glr_download_auto_examples_plot_fmri_data_example.py: diff --git a/docs/_sources/auto_examples/plot_knockoff_aggregation.rst.txt b/docs/_sources/auto_examples/plot_knockoff_aggregation.rst.txt index 2304b1e..ba70f41 100644 --- a/docs/_sources/auto_examples/plot_knockoff_aggregation.rst.txt +++ b/docs/_sources/auto_examples/plot_knockoff_aggregation.rst.txt @@ -205,9 +205,9 @@ Imports needed for this script .. rst-class:: sphx-glr-timing - **Total running time of the script:** (5 minutes 40.613 seconds) + **Total running time of the script:** (5 minutes 39.238 seconds) -**Estimated memory usage:** 841 MB +**Estimated memory usage:** 793 MB .. _sphx_glr_download_auto_examples_plot_knockoff_aggregation.py: diff --git a/docs/_sources/auto_examples/plot_variable_importance_classif.rst.txt b/docs/_sources/auto_examples/plot_variable_importance_classif.rst.txt index 438937e..13946bd 100644 --- a/docs/_sources/auto_examples/plot_variable_importance_classif.rst.txt +++ b/docs/_sources/auto_examples/plot_variable_importance_classif.rst.txt @@ -176,7 +176,7 @@ Visualize the data .. code-block:: none - [, , , , , , , , , ] + [, , , , , , , , , ] @@ -283,13 +283,6 @@ estimate the importance of the features. -.. rst-class:: sphx-glr-script-out - - .. code-block:: none - - /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/site-packages/joblib/externals/loky/process_executor.py:752: UserWarning: A worker stopped while some jobs were given to the executor. This can be caused by a too short worker timeout or by a memory leak. - warnings.warn( - @@ -422,16 +415,16 @@ the features. .. code-block:: none - + .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 42.709 seconds) + **Total running time of the script:** (0 minutes 33.797 seconds) -**Estimated memory usage:** 639 MB +**Estimated memory usage:** 640 MB .. _sphx_glr_download_auto_examples_plot_variable_importance_classif.py: diff --git a/docs/_sources/auto_examples/sg_execution_times.rst.txt b/docs/_sources/auto_examples/sg_execution_times.rst.txt index 5fc9fcb..4c68deb 100644 --- a/docs/_sources/auto_examples/sg_execution_times.rst.txt +++ b/docs/_sources/auto_examples/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**10:03.624** total execution time for 6 files **from auto_examples**: +**10:07.758** total execution time for 6 files **from auto_examples**: .. container:: @@ -33,20 +33,20 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_plot_knockoff_aggregation.py` (``plot_knockoff_aggregation.py``) - - 05:40.613 - - 841.3 + - 05:39.238 + - 793.3 * - :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` (``plot_fmri_data_example.py``) - - 01:23.795 - - 3287.3 + - 01:37.697 + - 3398.5 * - :ref:`sphx_glr_auto_examples_plot_2D_simulation_example.py` (``plot_2D_simulation_example.py``) - - 01:05.593 - - 722.1 + - 01:05.804 + - 722.0 * - :ref:`sphx_glr_auto_examples_plot_dcrt_example.py` (``plot_dcrt_example.py``) - - 01:02.729 - - 658.2 + - 01:02.893 + - 657.6 * - :ref:`sphx_glr_auto_examples_plot_variable_importance_classif.py` (``plot_variable_importance_classif.py``) - - 00:42.709 - - 639.3 + - 00:33.797 + - 639.7 * - :ref:`sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py` (``plot_diabetes_variable_importance_example.py``) - - 00:08.186 - - 643.0 + - 00:08.329 + - 642.8 diff --git a/docs/_sources/generated/hidimstat.ada_svr.rst.txt b/docs/_sources/generated/hidimstat.ada_svr.rst.txt deleted file mode 100644 index ed3dccf..0000000 --- a/docs/_sources/generated/hidimstat.ada_svr.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -hidimstat.ada\_svr -================== - -.. currentmodule:: hidimstat - -.. autofunction:: ada_svr \ No newline at end of file diff --git a/docs/_sources/sg_execution_times.rst.txt b/docs/_sources/sg_execution_times.rst.txt index 9122dec..ecdc207 100644 --- a/docs/_sources/sg_execution_times.rst.txt +++ b/docs/_sources/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**10:03.624** total execution time for 6 files **from all galleries**: +**10:07.758** total execution time for 6 files **from all galleries**: .. container:: @@ -33,20 +33,20 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_plot_knockoff_aggregation.py` (``../examples/plot_knockoff_aggregation.py``) - - 05:40.613 - - 841.3 + - 05:39.238 + - 793.3 * - :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` (``../examples/plot_fmri_data_example.py``) - - 01:23.795 - - 3287.3 + - 01:37.697 + - 3398.5 * - :ref:`sphx_glr_auto_examples_plot_2D_simulation_example.py` (``../examples/plot_2D_simulation_example.py``) - - 01:05.593 - - 722.1 + - 01:05.804 + - 722.0 * - :ref:`sphx_glr_auto_examples_plot_dcrt_example.py` (``../examples/plot_dcrt_example.py``) - - 01:02.729 - - 658.2 + - 01:02.893 + - 657.6 * - :ref:`sphx_glr_auto_examples_plot_variable_importance_classif.py` (``../examples/plot_variable_importance_classif.py``) - - 00:42.709 - - 639.3 + - 00:33.797 + - 639.7 * - :ref:`sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py` (``../examples/plot_diabetes_variable_importance_example.py``) - - 00:08.186 - - 643.0 + - 00:08.329 + - 642.8 diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index fafe80e..28b680e 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.1.dev1+g349ade8', + VERSION: '0.1.dev1+g635d003', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index 2c774d1..91f4be5 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -513,9 +513,11 @@ const Search = { // perform the search on the required terms searchTerms.forEach((word) => { const files = []; + // find documents, if any, containing the query word in their text/title term indices + // use Object.hasOwnProperty to avoid mismatching against prototype properties const arr = [ - { files: terms[word], score: Scorer.term }, - { files: titleTerms[word], score: Scorer.title }, + { files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term }, + { files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title }, ]; // add support for partial matches if (word.length > 2) { @@ -547,8 +549,9 @@ const Search = { // set score for the word in each file recordFiles.forEach((file) => { - if (!scoreMap.has(file)) scoreMap.set(file, {}); - scoreMap.get(file)[word] = record.score; + if (!scoreMap.has(file)) scoreMap.set(file, new Map()); + const fileScores = scoreMap.get(file); + fileScores.set(word, record.score); }); }); @@ -587,7 +590,7 @@ const Search = { break; // select one (max) score for the file. - const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w))); // add result to the result list results.push([ docNames[file], diff --git a/docs/api.html b/docs/api.html index a521dac..6cbccd2 100644 --- a/docs/api.html +++ b/docs/api.html @@ -5,7 +5,7 @@ - API Documentation — HiDimStat 0.1.dev1+g349ade8 documentation + API Documentation — HiDimStat 0.1.dev1+g635d003 documentation @@ -13,12 +13,12 @@ - + - + @@ -105,7 +105,7 @@
  • - +