Skip to content

Commit

Permalink
added examples for mi and entropy of multidim vars
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisferreyra13 committed Jul 18, 2024
1 parent b9febcf commit 0b8ae61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
5 changes: 2 additions & 3 deletions examples/it/plot_entropy_high_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@

# list of estimators to compare
metrics = {
"GCMI": get_entropy("gcmi", biascorrect=False),
"GCMI": get_entropy("gc", biascorrect=False),
"KNN-3": get_entropy("knn", k=3),
"KNN-10": get_entropy("knn", k=10),
"Kernel": get_entropy("kernel"),
}

# number of samples to simulate data
n_samples = np.geomspace(20, 1000, 10).astype(int)
n_samples = np.geomspace(100, 10000, 10).astype(int)

# number of repetitions to estimate the percentile interval
n_repeat = 10
Expand Down Expand Up @@ -152,4 +152,3 @@ def compute_true_entropy(cov_matrix):
)
fig.tight_layout()
plt.show()
print("Done")
4 changes: 2 additions & 2 deletions examples/it/plot_mi_high_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@

# list of estimators to compare
metrics = {
"GCMI": get_mi("gcmi", biascorrect=False),
"GCMI": get_mi("gc", biascorrect=False),
"KNN-3": get_mi("knn", k=3),
"KNN-10": get_mi("knn", k=10),
}

# number of samples to simulate data
n_samples = np.geomspace(20, 1000, 10).astype(int)
n_samples = np.geomspace(1000, 10000, 10).astype(int)

# number of repetitions to estimate the percentile interval
n_repeat = 10
Expand Down

0 comments on commit 0b8ae61

Please sign in to comment.