-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from pwollstadt/develop
Add bug fixes related to FDR corrections to master; add dependency on statsmodels
- Loading branch information
Showing
81 changed files
with
2,218 additions
and
1,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
# Import classes | ||
import matplotlib.pyplot as plt | ||
|
||
from idtxl.bivariate_mi import BivariateMI | ||
from idtxl.data import Data | ||
from idtxl.visualise_graph import plot_network | ||
import matplotlib.pyplot as plt | ||
|
||
# a) Generate test data | ||
data = Data() | ||
data.generate_mute_data(n_samples=1000, n_replications=5) | ||
|
||
# b) Initialise analysis object and define settings | ||
network_analysis = BivariateMI() | ||
settings = {'cmi_estimator': 'JidtGaussianCMI', | ||
'max_lag_sources': 5, | ||
'min_lag_sources': 1} | ||
settings = { | ||
"cmi_estimator": "JidtGaussianCMI", | ||
"max_lag_sources": 5, | ||
"min_lag_sources": 1, | ||
} | ||
|
||
# c) Run analysis | ||
results = network_analysis.analyse_network(settings=settings, data=data) | ||
|
||
# d) Plot inferred network to console and via matplotlib | ||
results.print_edge_list(weights='max_te_lag', fdr=False) | ||
plot_network(results=results, weights='max_te_lag', fdr=False) | ||
results.print_edge_list(weights="max_te_lag", fdr=False) | ||
plot_network(results=results, weights="max_te_lag", fdr=False) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
# Import classes | ||
import matplotlib.pyplot as plt | ||
|
||
from idtxl.bivariate_te import BivariateTE | ||
from idtxl.data import Data | ||
from idtxl.visualise_graph import plot_network | ||
import matplotlib.pyplot as plt | ||
|
||
# a) Generate test data | ||
data = Data() | ||
data.generate_mute_data(n_samples=1000, n_replications=5) | ||
|
||
# b) Initialise analysis object and define settings | ||
network_analysis = BivariateTE() | ||
settings = {'cmi_estimator': 'JidtGaussianCMI', | ||
'max_lag_sources': 5, | ||
'min_lag_sources': 1} | ||
settings = { | ||
"cmi_estimator": "JidtGaussianCMI", | ||
"max_lag_sources": 5, | ||
"min_lag_sources": 1, | ||
} | ||
|
||
# c) Run analysis | ||
results = network_analysis.analyse_network(settings=settings, data=data) | ||
|
||
# d) Plot inferred network to console and via matplotlib | ||
results.print_edge_list(weights='max_te_lag', fdr=False) | ||
plot_network(results=results, weights='max_te_lag', fdr=False) | ||
results.print_edge_list(weights="max_te_lag", fdr=False) | ||
plot_network(results=results, weights="max_te_lag", fdr=False) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
# Import classes | ||
from idtxl.multivariate_mi import MultivariateMI | ||
import matplotlib.pyplot as plt | ||
|
||
from idtxl.data import Data | ||
from idtxl.multivariate_mi import MultivariateMI | ||
from idtxl.visualise_graph import plot_network | ||
import matplotlib.pyplot as plt | ||
|
||
# a) Generate test data | ||
data = Data() | ||
data.generate_mute_data(n_samples=1000, n_replications=5) | ||
|
||
# b) Initialise analysis object and define settings | ||
network_analysis = MultivariateMI() | ||
settings = {'cmi_estimator': 'JidtGaussianCMI', | ||
'max_lag_sources': 5, | ||
'min_lag_sources': 1} | ||
settings = { | ||
"cmi_estimator": "JidtGaussianCMI", | ||
"max_lag_sources": 5, | ||
"min_lag_sources": 1, | ||
} | ||
|
||
# c) Run analysis | ||
results = network_analysis.analyse_network(settings=settings, data=data) | ||
|
||
# d) Plot inferred network to console and via matplotlib | ||
results.print_edge_list(weights='max_te_lag', fdr=False) | ||
plot_network(results=results, weights='max_te_lag', fdr=False) | ||
results.print_edge_list(weights="max_te_lag", fdr=False) | ||
plot_network(results=results, weights="max_te_lag", fdr=False) | ||
plt.show() |
Oops, something went wrong.