Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
achamma723 committed Jul 10, 2024
2 parents c615a81 + 68e2d2d commit 15c8f05
Show file tree
Hide file tree
Showing 39 changed files with 159 additions and 153 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
bbi_perm = BlockBasedImportance(
estimator="RF",
importance_estimator="Mod_RF",
do_hyper=True,
dict_hyper=None,
do_hypertuning=True,
dict_hypertuning=None,
conditional=False,
group_stacking=False,
prob_type="regression",
problem_type="regression",
k_fold=k_fold,
list_nominal=list_nominal,
n_jobs=10,
Expand All @@ -58,11 +58,11 @@
bbi_cond = BlockBasedImportance(
estimator="RF",
importance_estimator="Mod_RF",
do_hyper=True,
dict_hyper=None,
do_hypertuning=True,
dict_hypertuning=None,
conditional=True,
group_stacking=False,
prob_type="regression",
problem_type="regression",
k_fold=k_fold,
list_nominal=list_nominal,
n_jobs=10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"outputs": [],
"source": [
"bbi_perm = BlockBasedImportance(\n estimator=\"RF\",\n importance_estimator=\"Mod_RF\",\n do_hyper=True,\n dict_hyper=None,\n conditional=False,\n group_stacking=False,\n prob_type=\"regression\",\n k_fold=k_fold,\n list_nominal=list_nominal,\n n_jobs=10,\n verbose=0,\n n_perm=100,\n)\nbbi_perm.fit(X, y)\nprint(\"Computing the importance scores with standard permutation\")\nresults_perm = bbi_perm.compute_importance()\npvals_perm = -np.log10(results_perm[\"pval\"] + 1e-10)"
"bbi_perm = BlockBasedImportance(\n estimator=\"RF\",\n importance_estimator=\"Mod_RF\",\n do_hypertuning=True,\n dict_hypertuning=None,\n conditional=False,\n group_stacking=False,\n problem_type=\"regression\",\n k_fold=k_fold,\n list_nominal=list_nominal,\n n_jobs=10,\n verbose=0,\n n_perm=100,\n)\nbbi_perm.fit(X, y)\nprint(\"Computing the importance scores with standard permutation\")\nresults_perm = bbi_perm.compute_importance()\npvals_perm = -np.log10(results_perm[\"pval\"] + 1e-10)"
]
},
{
Expand All @@ -58,7 +58,7 @@
},
"outputs": [],
"source": [
"bbi_cond = BlockBasedImportance(\n estimator=\"RF\",\n importance_estimator=\"Mod_RF\",\n do_hyper=True,\n dict_hyper=None,\n conditional=True,\n group_stacking=False,\n prob_type=\"regression\",\n k_fold=k_fold,\n list_nominal=list_nominal,\n n_jobs=10,\n verbose=0,\n n_perm=100,\n)\nbbi_cond.fit(X, y)\nprint(\"Computing the importance scores with conditional permutation\")\nresults_cond = bbi_cond.compute_importance()\npvals_cond = -np.log10(results_cond[\"pval\"] + 1e-5)"
"bbi_cond = BlockBasedImportance(\n estimator=\"RF\",\n importance_estimator=\"Mod_RF\",\n do_hypertuning=True,\n dict_hypertuning=None,\n conditional=True,\n group_stacking=False,\n problem_type=\"regression\",\n k_fold=k_fold,\n list_nominal=list_nominal,\n n_jobs=10,\n verbose=0,\n n_perm=100,\n)\nbbi_cond.fit(X, y)\nprint(\"Computing the importance scores with conditional permutation\")\nresults_cond = bbi_cond.compute_importance()\npvals_cond = -np.log10(results_cond[\"pval\"] + 1e-5)"
]
},
{
Expand Down
Binary file modified docs/_images/sphx_glr_plot_fmri_data_example_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/sphx_glr_plot_fmri_data_example_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/_sources/auto_examples/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Examples Gallery

.. only:: html

.. image:: /auto_examples/images/thumb/sphx_glr_plot_diabetesFeatures_importance_example_thumb.png
.. image:: /auto_examples/images/thumb/sphx_glr_plot_diabetes_variable_importance_example_thumb.png
:alt:

:ref:`sphx_glr_auto_examples_plot_diabetesFeatures_importance_example.py`
:ref:`sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py`

.. raw:: html

Expand Down Expand Up @@ -78,7 +78,7 @@ Examples Gallery
.. toctree::
:hidden:

/auto_examples/plot_diabetesFeatures_importance_example
/auto_examples/plot_diabetes_variable_importance_example
/auto_examples/plot_2D_simulation_example
/auto_examples/plot_fmri_data_example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ randomization.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (1 minutes 9.270 seconds)
**Total running time of the script:** (1 minutes 0.085 seconds)

**Estimated memory usage:** 101 MB
**Estimated memory usage:** 99 MB


.. _sphx_glr_download_auto_examples_plot_2D_simulation_example.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/plot_diabetesFeatures_importance_example.py"
.. "auto_examples/plot_diabetes_variable_importance_example.py"
.. LINE NUMBERS ARE GIVEN BELOW.
.. only:: html

.. note::
:class: sphx-glr-download-link-note

:ref:`Go to the end <sphx_glr_download_auto_examples_plot_diabetesFeatures_importance_example.py>`
:ref:`Go to the end <sphx_glr_download_auto_examples_plot_diabetes_variable_importance_example.py>`
to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_plot_diabetesFeatures_importance_example.py:
.. _sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py:


Variable Importance on diabetes dataset
Expand Down Expand Up @@ -72,11 +72,11 @@ Standard Variable Importance
bbi_perm = BlockBasedImportance(
estimator="RF",
importance_estimator="Mod_RF",
do_hyper=True,
dict_hyper=None,
do_hypertuning=True,
dict_hypertuning=None,
conditional=False,
group_stacking=False,
prob_type="regression",
problem_type="regression",
k_fold=k_fold,
list_nominal=list_nominal,
n_jobs=10,
Expand Down Expand Up @@ -116,11 +116,11 @@ Conditional Variable Importance
bbi_cond = BlockBasedImportance(
estimator="RF",
importance_estimator="Mod_RF",
do_hyper=True,
dict_hyper=None,
do_hypertuning=True,
dict_hypertuning=None,
conditional=True,
group_stacking=False,
prob_type="regression",
problem_type="regression",
k_fold=k_fold,
list_nominal=list_nominal,
n_jobs=10,
Expand Down Expand Up @@ -182,9 +182,9 @@ Plotting the comparison
.. image-sg:: /auto_examples/images/sphx_glr_plot_diabetesFeatures_importance_example_001.png
:alt: plot diabetesFeatures importance example
:srcset: /auto_examples/images/sphx_glr_plot_diabetesFeatures_importance_example_001.png
.. image-sg:: /auto_examples/images/sphx_glr_plot_diabetes_variable_importance_example_001.png
:alt: plot diabetes variable importance example
:srcset: /auto_examples/images/sphx_glr_plot_diabetes_variable_importance_example_001.png
:class: sphx-glr-single-img


Expand All @@ -194,24 +194,24 @@ Plotting the comparison

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 47.285 seconds)
**Total running time of the script:** (0 minutes 46.171 seconds)

**Estimated memory usage:** 32 MB
**Estimated memory usage:** 28 MB


.. _sphx_glr_download_auto_examples_plot_diabetesFeatures_importance_example.py:
.. _sphx_glr_download_auto_examples_plot_diabetes_variable_importance_example.py:

.. only:: html

.. container:: sphx-glr-footer sphx-glr-footer-example

.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download Jupyter notebook: plot_diabetesFeatures_importance_example.ipynb <plot_diabetesFeatures_importance_example.ipynb>`
:download:`Download Jupyter notebook: plot_diabetes_variable_importance_example.ipynb <plot_diabetes_variable_importance_example.ipynb>`

.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: plot_diabetesFeatures_importance_example.py <plot_diabetesFeatures_importance_example.py>`
:download:`Download Python source code: plot_diabetes_variable_importance_example.py <plot_diabetes_variable_importance_example.py>`


.. only:: html
Expand Down
8 changes: 4 additions & 4 deletions docs/_sources/auto_examples/plot_fmri_data_example.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ You may choose a subject in [1, 2, 3, 4, 5, 6]. By default subject=2.
Downloading data from http://data.pymvpa.org/datasets/haxby2001/MD5SUMS ...
...done. (0 seconds, 0 min)
Downloading data from http://data.pymvpa.org/datasets/haxby2001/subj2-2010.01.14.tar.gz ...
Downloaded 107290624 of 291168628 bytes (36.8%, 1.7s remaining) Downloaded 238895104 of 291168628 bytes (82.0%, 0.4s remaining) ...done. (3 seconds, 0 min)
Downloaded 20447232 of 291168628 bytes (7.0%, 13.6s remaining) Downloaded 62308352 of 291168628 bytes (21.4%, 7.6s remaining) Downloaded 104996864 of 291168628 bytes (36.1%, 5.5s remaining) Downloaded 147136512 of 291168628 bytes (50.5%, 4.0s remaining) Downloaded 189079552 of 291168628 bytes (64.9%, 2.8s remaining) Downloaded 231620608 of 291168628 bytes (79.5%, 1.6s remaining) Downloaded 273883136 of 291168628 bytes (94.1%, 0.5s remaining) ...done. (8 seconds, 0 min)
Extracting data from /home/runner/nilearn_data/haxby2001/def37a305edfda829916fa14c9ea08f8/subj2-2010.01.14.tar.gz..... done.


Expand Down Expand Up @@ -361,7 +361,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.6s finished
[Parallel(n_jobs=2)]: Done 5 out of 5 | elapsed: 31.3s finished
Expand Down Expand Up @@ -599,9 +599,9 @@ spurious discoveries.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (1 minutes 25.149 seconds)
**Total running time of the script:** (1 minutes 26.859 seconds)

**Estimated memory usage:** 2772 MB
**Estimated memory usage:** 2762 MB


.. _sphx_glr_download_auto_examples_plot_fmri_data_example.py:
Expand Down
16 changes: 8 additions & 8 deletions docs/_sources/auto_examples/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**03:21.704** total execution time for 3 files **from auto_examples**:
**03:13.114** total execution time for 3 files **from auto_examples**:

.. container::

Expand All @@ -33,11 +33,11 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` (``plot_fmri_data_example.py``)
- 01:25.149
- 2772.0
- 01:26.859
- 2762.1
* - :ref:`sphx_glr_auto_examples_plot_2D_simulation_example.py` (``plot_2D_simulation_example.py``)
- 01:09.270
- 100.8
* - :ref:`sphx_glr_auto_examples_plot_diabetesFeatures_importance_example.py` (``plot_diabetesFeatures_importance_example.py``)
- 00:47.285
- 31.5
- 01:00.085
- 98.6
* - :ref:`sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py` (``plot_diabetes_variable_importance_example.py``)
- 00:46.171
- 28.4
16 changes: 8 additions & 8 deletions docs/_sources/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**03:21.704** total execution time for 3 files **from all galleries**:
**03:13.114** total execution time for 3 files **from all galleries**:

.. container::

Expand All @@ -33,11 +33,11 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_fmri_data_example.py` (``../examples/plot_fmri_data_example.py``)
- 01:25.149
- 2772.0
- 01:26.859
- 2762.1
* - :ref:`sphx_glr_auto_examples_plot_2D_simulation_example.py` (``../examples/plot_2D_simulation_example.py``)
- 01:09.270
- 100.8
* - :ref:`sphx_glr_auto_examples_plot_diabetesFeatures_importance_example.py` (``../examples/plot_diabetesFeatures_importance_example.py``)
- 00:47.285
- 31.5
- 01:00.085
- 98.6
* - :ref:`sphx_glr_auto_examples_plot_diabetes_variable_importance_example.py` (``../examples/plot_diabetes_variable_importance_example.py``)
- 00:46.171
- 28.4
6 changes: 3 additions & 3 deletions docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>API Documentation &#8212; hidimstat 0.1.0 documentation</title>
<title>API Documentation &#8212; HiDimStat 0.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css?v=284a2d1d" />
<link rel="stylesheet" type="text/css" href="_static/style.css?v=fbda0898" />
Expand Down Expand Up @@ -41,7 +41,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
hidimstat</a>
HiDimStat</a>
<span class="navbar-text navbar-version pull-left"><b>0.1.0</b></span>
</div>

Expand Down Expand Up @@ -138,7 +138,7 @@ <h2>Functions<a class="headerlink" href="#functions" title="Link to this heading
<td><p>Aggregation of survival function values by adaptive quantile procedure</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/hidimstat.BlockBasedImportance.html#hidimstat.BlockBasedImportance" title="hidimstat.BlockBasedImportance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BlockBasedImportance</span></code></a>([estimator, ...])</p></td>
<td><p>This class implements the Block Based Importance (BBI),</p></td>
<td><p>This class implements the Block-Based Importance (BBI), consisting of a learner block (first block) and an importance block (second block). For single-level see <a href="#id3"><span class="problematic" id="id4">:footcite:t:`Chamma_NeurIPS2023`</span></a> and for group-level see <a href="#id5"><span class="problematic" id="id6">:footcite:t:`Chamma_AAAI2024`</span></a>. Parameters ---------- estimator: scikit-learn compatible estimator, default=None The provided estimator for the prediction task (First block). The default estimator is the DNN learner. Other options are (1) RF for Random Forest. importance_estimator: {scikit-learn compatible estimator or string}, default=Mod_RF The provided estimator for the importance task (Second block). Using &quot;Mod_RF&quot; will apply the modified version of the Random Forest as the importance predictor. do_hypertuning: bool, default=True Tuning the hyperparameters of the provided estimator. dict_hypertuning: dict, default=None The dictionary of hyperparameters to tune. problem_type: str, default='regression' A classification or a regression problem. bootstrap: bool, default=True Application of bootstrap sampling for the training set. split_perc: float, default=0.8 The training/validation cut for the provided data. conditional: bool, default=True The permutation or the conditional sampling approach. list_nominal: dict, default=None The dictionary of binary, nominal and ordinal variables. Perm: bool, default=False The use of permutations or random sampling with CPI-DNN. n_perm: int, default=50 The number of permutations/random sampling for each column. n_jobs: int, default=1 The number of workers for parallel processing. verbose: int, default=0 If verbose &gt; 0, the fitted iterations will be printed. groups: dict, default=None The knowledge-driven/data-driven grouping of the variables if provided. group_stacking: bool, default=False Apply the stacking-based method for the provided groups. prop_out_subLayers: int, default=0. If group_stacking is set to True, proportion of outputs for the linear sub-layers per group. index_i: int, default=None The index of the current processed iteration. random_state: int, default=2023 Fixing the seeds of the random generator. com_imp: boolean, default=True Compute or not the importance scores. group_label: list, default=None The list of group labels to perform GroupKFold Attributes ---------- ToDO.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/hidimstat.clustered_inference.html#hidimstat.clustered_inference" title="hidimstat.clustered_inference"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clustered_inference</span></code></a>(X_init, y, ward, n_clusters)</p></td>
<td><p>Clustered inference algorithm</p></td>
Expand Down
8 changes: 4 additions & 4 deletions docs/auto_examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>Examples Gallery &#8212; hidimstat 0.1.0 documentation</title>
<title>Examples Gallery &#8212; HiDimStat 0.1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/bootstrap-sphinx.css?v=284a2d1d" />
<link rel="stylesheet" type="text/css" href="../_static/style.css?v=fbda0898" />
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
hidimstat</a>
HiDimStat</a>
<span class="navbar-text navbar-version pull-left"><b>0.1.0</b></span>
</div>

Expand Down Expand Up @@ -110,8 +110,8 @@

<section id="examples-gallery">
<span id="general-examples"></span><h1>Examples Gallery<a class="headerlink" href="#examples-gallery" title="Link to this heading"></a></h1>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example compares the standard permutation approach for variable importance and its conditi..."><img alt="" src="../_images/sphx_glr_plot_diabetesFeatures_importance_example_thumb.png" />
<p><a class="reference internal" href="plot_diabetesFeatures_importance_example.html#sphx-glr-auto-examples-plot-diabetesfeatures-importance-example-py"><span class="std std-ref">Variable Importance on diabetes dataset</span></a></p>
<div class="sphx-glr-thumbnails"><div class="sphx-glr-thumbcontainer" tooltip="This example compares the standard permutation approach for variable importance and its conditi..."><img alt="" src="../_images/sphx_glr_plot_diabetes_variable_importance_example_thumb.png" />
<p><a class="reference internal" href="plot_diabetes_variable_importance_example.html#sphx-glr-auto-examples-plot-diabetes-variable-importance-example-py"><span class="std std-ref">Variable Importance on diabetes dataset</span></a></p>
<div class="sphx-glr-thumbnail-title">Variable Importance on diabetes dataset</div>
</div><div class="sphx-glr-thumbcontainer" tooltip="This example shows the advantages of spatially relaxed inference when dealing with high-dimensi..."><img alt="" src="../_images/sphx_glr_plot_2D_simulation_example_thumb.png" />
<p><a class="reference internal" href="plot_2D_simulation_example.html#sphx-glr-auto-examples-plot-2d-simulation-example-py"><span class="std std-ref">Support recovery on simulated data (2D)</span></a></p>
Expand Down
Loading

0 comments on commit 15c8f05

Please sign in to comment.