-
Notifications
You must be signed in to change notification settings - Fork 76
Statistical comparison between individual links within the same network
Patricia Wollstadt edited this page Feb 2, 2022
·
1 revision
IDTxl provides functionality to compare two links within the same network:
# Generate example data and perform network inference.
data_a = Data()
data_a.generate_mute_data(100, 5)
settings = {
'cmi_estimator': 'JidtKraskovCMI',
'n_perm_max_stat': 50,
'n_perm_min_stat': 50,
'n_perm_omnibus': 200,
'n_perm_max_seq': 50,
'max_lag_target': 5,
'max_lag_sources': 5,
'min_lag_sources': 1,
'permute_in_time': True
}
network_analysis = MultivariateTE()
res_a = network_analysis.analyse_network(settings, data_a, targets=[0, 1, 2], sources='all')
# comparison settings
comp_settings = {
'cmi_estimator': 'JidtKraskovCMI',
'n_perm_max_stat': 50,
'n_perm_min_stat': 50,
'n_perm_omnibus': 200,
'n_perm_max_seq': 50,
'alpha_comp': 0.26,
'n_perm_comp': 4,
'tail': 'two'
}
link_a = [0, 1]
link_b = [0, 2]
comp = NetworkComparison()
comp_settings['stats_type'] = 'independent'
res_indep = comp.compare_links_within(
settings=comp_settings,
link_a=link_a,
link_b=link_b,
network=res,
data=data
)
comp_settings['stats_type'] = 'dependent'
res_dep = comp.compare_links_within(
settings=comp_settings,
link_a=[0, 1],
link_b=[0, 2],
network=res,
data=data
)