Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] MI and CMI simulation module and relevant estimators from the forest #83

Merged
merged 19 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .spin/cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def setup_submodule(forcesubmodule=False):
"submodule",
"update",
"--init",
"--force",
# "--force",
]
)

Expand Down Expand Up @@ -111,6 +111,7 @@ def setup_submodule(forcesubmodule=False):
commit_fpath,
],
)
print(commit_fpath)
with open(commit_fpath, "w") as f:
f.write(current_hash)

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ You can also do the same thing using Meson/Ninja itself. Run the following to bu
python -c "from sktree import tree"
python -c "import sklearn; print(sklearn.__version__);"

Alternatively, you can use editable installs

pip install --no-build-isolation --editable .

References
==========
[1]: [`Li, Adam, et al. "Manifold Oblique Random Forests: Towards Closing the Gap on Convolutional Deep Networks." arXiv preprint arXiv:1909.11799 (2019)`](https://arxiv.org/abs/1909.11799)
37 changes: 37 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,40 @@ The trees that comprise those forests are also available as standalone classes.

tree.UnsupervisedDecisionTree
tree.UnsupervisedObliqueDecisionTree


Distance Metrics
----------------
Trees inherently produce a "distance-like" metric. We provide an API for
extracting pairwise distances from the trees that include a correction
that turns the "tree-distance" into a proper distance metric.

.. currentmodule:: sktree.ensemble
.. autosummary::
:toctree: generated/

pairwise_forest_distance

Experimental Functionality
--------------------------
We also include experimental functionality that is works in progress.

.. currentmodule:: sktree.experimental
.. autosummary::
:toctree: generated/

mutual_info_ksg

We also include functions that help simulate and evaluate mutual information (MI)
and conditional mutual information (CMI) estimators. Specifically, functions that
help simulate multivariate gaussian data and compute the analytical solutions
for the entropy, MI and CMI of the Gaussian distributions.

.. currentmodule:: sktree.experimental
.. autosummary::
:toctree: generated/

mi_gaussian
cmi_gaussian
entropy_gaussian
simulate_multivariate_gaussian
2 changes: 2 additions & 0 deletions docs/whats_new/v0.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Changelog
- |Feature| A general-kernel MORF is now implemented where users can pass in a kernel library, by `Adam Li`_ (:pr:`70`)
- |Feature| Implementation of ObliqueDecisionTreeRegressor, PatchObliqueDecisionTreeRegressor, ObliqueRandomForestRegressor, PatchObliqueRandomForestRegressor, by `SUKI-O`_ (:pr:`72`)
- |Feature| Implementation of HonestTreeClassifier, HonestForestClassifier, by `Sambit Panda`_, `Adam Li`_, `Ronan Perry`_ and `Haoyin Xu`_ (:pr:`57`)
- |Feature| Implementation of (conditional) mutual information estimation via unsupervised tree models, by `Adam Li`_ (:pr:`47`)


Code and Documentation Contributors
-----------------------------------
Expand Down
Loading