Source

bubble-economy / trader_stats_sets.py

from utils import d
#### Sets of statistics to calculate over given experimental trials
# Stats can either just be a function name or a tuple of (key, func_string, kwarg)

# a gruelling journey into various permutations of MI of large agents sets to find the ones that go.
stats_2d = [
  ("order_complete", "order", d(n_slices=1)),
  ("order_continuous", "order", d(n_steps=1)),
  ("vel_loc_self_mi_adaptive_continuous", "vel_loc_self_mi_adaptive", d(n_steps=1)),
  ("vel_loc_self_mi_adaptive_stepped", "vel_loc_self_mi_adaptive", d(n_steps=1, skip=500)),
  ("vel_loc_self_mi_adaptive_complete", "vel_loc_self_mi_adaptive", d(n_slices=1)),
  ("mi_wicks_2d_continuous", "mi_wicks_2d", d(n_steps=1)),
  ("mi_wicks_2d_stepped", "mi_wicks_2d", d(n_steps=1, skip=500)),
  ("mi_wicks_2d_complete", "mi_wicks_2d", d(n_slices=1)),
]

what_terry_wants = [
  ("order_complete", "order", d(n_slices=1)),
  ("order_continuous", "order", d(n_steps=1)),
  ("mi_wicks_2d_piecewise_squished", "mi_wicks_2d", d(n_slices=10, squish=True, estimator='plugin')),
  ("mi_wicks_2d_stepwise_squished", "mi_wicks_2d", d(n_steps=1, skip=50, squish=True, estimator='plugin')),
  ("mi_wicks_2d_piecewise_adaptive", "mi_wicks_2d", d(n_slices=10, squish=True, binning='cont', estimator='plugin')),
  ("mi_wicks_2d_stepwise_adaptive", "mi_wicks_2d", d(n_steps=1, skip=50, squish=True, binning='cont', estimator='plugin')),
  ("mi_distance_angular_vel_particlewise_macerated_100_5_apriori", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=100, estimator="naive", oversample=5, binning='disc', squish=True)),
  ("mi_distance_angular_vel_particlewise_macerated_100_5_cont", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=100, estimator="naive", oversample=5, binning='cont')),
]

gu_danesque_2d = [
  ("mi_distance_angular_vel_apriori_particlewise_alt_50", "mi_distance_angular_vel_apriori_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=50)),
  ("mi_distance_angular_vel_apriori_particlewise_alt_500", "mi_distance_angular_vel_apriori_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=500)),
#  ("mi_distance_angular_vel_particlewise_alt_100", "mi_distance_angular_vel_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=100)),
  ("mi_distance_angular_vel_particlewise_macerated_100_5", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=100, estimator="naive", oversample=5)),
  ("mi_distance_angular_vel_particlewise_macerated_1_500", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=1, estimator="naive", oversample=500)),
  ("mi_distance_angular_vel_particlewise_macerated_all_50", "mi_distance_angular_vel_particlewise_macerated", d(n_slices=1, estimator="naive", oversample=50)),
  ("order_continuous", "order", d(n_steps=1)),
]

gu_danesque_addendum = [
  ("mi_distance_angular_vel_apriori_particlewise_alt_1000", "mi_distance_angular_vel_apriori_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=500)),
#  ("mi_distance_angular_vel_particlewise_alt_100", "mi_distance_angular_vel_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=100)),
  ("mi_distance_angular_vel_particlewise_macerated_100_5", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=100, estimator="naive", oversample=5)),
  ("mi_distance_angular_vel_particlewise_macerated_1_500", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=1, estimator="naive", oversample=500)),
  ("mi_distance_angular_vel_particlewise_macerated_all_50", "mi_distance_angular_vel_particlewise_macerated", d(n_slices=1, estimator="naive", oversample=50)),
]

gu_danesque_addendum_plus = [
  ("mi_distance_angular_vel_particlewise_macerated_100_5_squished", "mi_distance_angular_vel_particlewise_macerated", d(n_steps=100, squish=True, estimator="naive", oversample=5)),
  ("mi_wicks_2d_piecewise_squished", "mi_wicks_2d", d(n_slices=10, squish=True)),
]

gu_danesque_continuous_test = [
  ("mi_distance_angular_vel_particlewise_macerated_100", "mi_distance_angular_vel_particlewise_macerated", d(n_slices=1, estimator="naive", oversample=2)),
]

particlewise_distance_correlations =[
  ("mi_distance_angular_vel_apriori_particlewise_alt_50", "mi_distance_angular_vel_apriori_particlewise", d(n_slices=1, estimator="naive", n_agents=2, oversample=50)),
  ("order_continuous", "order", d(n_steps=1)),
]

basic_stats_set = [
  ("vel_loc_self_mi_adaptive_complete", "vel_loc_self_mi_adaptive", d(n_slices=1)),
  ("order_complete", "order", d(n_slices=1)),
  "susceptibility",
]

# a gruelling journey into various permutations of MI of large agents sets to find the ones that go.
mi_slapdown_stats_set_2d = [
  ("order_complete", "order", d(n_slices=1)),
  ("order_continuous", "order", d(n_steps=1)),
  "susceptibility",
  ("vel_loc_self_mi_adaptive_complete", "vel_loc_self_mi_adaptive", d(n_slices=1)),
  ("vel_loc_self_mi_apriori_complete", "vel_loc_self_mi_apriori", d(n_slices=1)),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_slices=10)),
  ("mi_wicks_2d_complete", "mi_wicks_2d", d(n_slices=1)),
  "mi_wicks_2d",
]

wicks_vs_me = [
  ("order", "order", d(n_steps=500)),
  ("order_continuous", "order", d(n_steps=1)),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_steps=500)),
  ("mi_angular_vel_apriori_particlewise_2_200", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
]

wicks_vs_me_plus_baseline = [
  ("order", "order", d(n_steps=500)),
  ("order_continuous", "order", d(n_steps=1)),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_steps=500)),
  ("mi_angular_vel_apriori_particlewise_2_200", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
  #this last, baseline stat is one i know not to misbehave
  ("mi_angular_vel_particlewise_2_200", "mi_angular_vel_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
]

wicks_vs_me_vs_ince = [
  ("order", "order", d(n_steps=500)),
  ("order_continuous", "order", d(n_steps=1)),
  ("mi_wicks_2d_piecewise_alt", "mi_wicks_2d", d(n_steps=500, estimator="naive")),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_steps=500)),
  ("mi_angular_vel_apriori_particlewise_2_200", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
  ("mi_angular_vel_particlewise_2_200", "mi_angular_vel_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
  ("mi_angular_vel_apriori_particlewise_2_200_alt", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=200, estimator="naive")),
  ("mi_angular_vel_particlewise_2_200_alt", "mi_angular_vel_particlewise", d(n_slices=1, n_agents=2, oversample=200, estimator="naive")),
]

#stats that work in 2d and on small sets of agents
slim_mi_slapdown_stats_set_2d = [
  ("order_complete", "order", d(n_slices=1)),
  "order",
  "susceptibility",
  ("susceptibility_piecewise", "susceptibility", d(n_slices=10)),
  "vel_loc_self_mi_adaptive",
  "vel_loc_self_mi_apriori",
  ("vel_loc_self_mi_apriori_complete", "vel_loc_self_mi_apriori", d(n_slices=1)),
  ("mi_wicks_2d_complete", "mi_wicks_2d", d(n_slices=1)),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_slices=10)),
  "mi_wicks_2d",
]

slim_mi_slapdown_high_d_stats_set = [
  ("order_complete", "order", d(n_slices=1)),
  "order",
  "susceptibility",
  ("susceptibility_piecewise", "susceptibility", d(n_slices=10)),
  ("vel_loc_self_mi_adaptive_complete", "vel_loc_self_mi_adaptive", d(n_slices=1)),
  ("vel_loc_self_mi_apriori_complete", "vel_loc_self_mi_apriori", d(n_slices=1)),
  "vel_loc_self_mi_adaptive",
  "vel_loc_self_mi_apriori",
]

order_mi_susc_ftw2 = [
  ("order_complete", "order", d(n_slices=1)),
  ("order_piecewise", "order", d(n_slices=10)),
  ("order_continuous", "order", d(n_steps=1)),
  ("susceptibility_complete", "susceptibility", d(n_slices=1)),
  ("susceptibility_piecewise", "susceptibility", d(n_slices=10)),
  ("susceptibility_continuous", "susceptibility", d(n_steps=1)),
#  ("vel_loc_self_mi_adaptive_complete", "vel_loc_self_mi_adaptive", d(n_slices=1)),
#  ("vel_loc_self_mi_adaptive_piecewise", "vel_loc_self_mi_adaptive", d(n_slices=10)),
#  ("vel_loc_self_mi_adaptive_continuous", "vel_loc_self_mi_adaptive", d(n_ssteps=1)),
  ("vel_loc_self_mi_apriori_piecewise_wicks", "vel_loc_self_mi_apriori", d(n_slices=10, n_bins="wicks")),
  ("vel_loc_self_mi_apriori_complete_wicks", "vel_loc_self_mi_apriori", d(n_slices=1, n_bins="wicks")),
  ("vel_loc_self_mi_apriori_continuous_wicks", "vel_loc_self_mi_apriori", d(n_steps=1, n_bins="wicks")),
  ("vel_loc_self_mi_apriori_piecewise_cochrane", "vel_loc_self_mi_apriori", d(n_slices=10, n_bins="cochrane")),
  ("vel_loc_self_mi_apriori_complete_cochrane", "vel_loc_self_mi_apriori", d(n_slices=1, n_bins="cochrane")),
  ("vel_loc_self_mi_apriori_continuous_cochrane", "vel_loc_self_mi_apriori", d(n_steps=1, n_bins="cochrane")),
]

order_mi_susc_ftw_trimmed = [
  ("order_continuous", "order", d(n_steps=1)),
  ("susceptibility_continuous", "susceptibility", d(n_steps=1)),
  ("vel_loc_self_mi_apriori_continuous_wicks", "vel_loc_self_mi_apriori", d(n_steps=1, n_bins="wicks")),
  ("vel_loc_self_mi_apriori_continuous_cochrane", "vel_loc_self_mi_apriori", d(n_steps=1, n_bins="cochrane")),
]

#This says "whitened" but i have no reason to suppose that acceleration stats
# are in fact white. WhitER, perhaps.
whitened_stats_2d = [
  ("order_continuous", "order", d(n_steps=1)),
  ("susceptibility_continuous", "susceptibility", d(n_steps=1)),
  ("acc_acc_axiswise_mi_adaptive_hi_d", "acc_acc_axiswise_mi_adaptive_hi_d", d(n_slices=10)),
  ("acc_acc_axiswise_mi_adaptive_hi_d_complete", "acc_acc_axiswise_mi_adaptive_hi_d", d(n_slices=1)),
  ("mi_wicks_2d_piecewise", "mi_wicks_2d", d(n_slices=10)),
  ("mi_wicks_2d_complete", "mi_wicks_2d", d(n_slices=1)),
  "mi_wicks_2d",
]

whitened_stats_hi_d = [
  ("order_continuous", "order", d(n_steps=1)),
  ("susceptibility_continuous", "susceptibility", d(n_steps=1)),
  # too slow:
  # ("acc_acc_particlewise_mi_adaptive_2d_complete", "acc_acc_particlewise_mi_adaptive_2d", d(n_slices=1)),
  ("acc_acc_axiswise_mi_adaptive_hi_d", "acc_acc_axiswise_mi_adaptive_hi_d", d(n_slices=10)),
  ("acc_acc_axiswise_mi_adaptive_hi_d_complete", "acc_acc_axiswise_mi_adaptive_hi_d", d(n_slices=1)),
  ("mi_wicks_hi_d_piecewise", "mi_wicks_hi_d", d(n_slices=10)),
  ("mi_wicks_hi_d_complete", "mi_wicks_hi_d", d(n_slices=1)),
  "mi_wicks_hi_d",
]

#under construction: stats sets which sweep sample length
swept_stats = [
  "order_swept",
  "susceptibility_swept",
  "acc_acc_axiswise_mi_adaptive_hi_d_swept",
  "mi_wicks_2d_swept",
  ("mi_wicks_2d_piecewise_alt_swept", "mi_wicks_2d_swept", d(estimator="naive")),
]
bonus_swept_stats = [
  ("mi_wicks_2d_piecewise_alt_swept", "mi_wicks_2d_swept", d(estimator="naive")),
]

order_mi_susc_test = [
  ("order_complete", "order", d(n_slices=1)),
  ("susceptibility_complete", "susceptibility", d(n_slices=1)),
  ("vel_loc_self_mi_apriori_complete", "vel_loc_self_mi_apriori", d(n_slices=1))
]

hi_d_test_stats = [
#  ("mi_wicks_hi_d", "mi_wicks_hi_d", d(n_slices=1)),
  ("acc_acc_axiswise_mi_adaptive_hi_d_complete", "acc_acc_axiswise_mi_adaptive_hi_d", d(n_slices=1)),
]

particlewise_angley = [
  ("mi_angular_vel_particlewise_2_100", "mi_angular_vel_particlewise", d(n_slices=1, n_agents=2, oversample=100)),
]

particlewise_angley_swept = [
  ("mi_angular_vel_particlewise_swept_2_20", "mi_angular_vel_particlewise_swept", dict(n_agents=2, oversample=20))
]

particlewise_angley2_test = [
  ("mi_angular_vel_apriori_particlewise_2_100", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=100)),
]

particlewise_angley_apriori = [
  ("mi_angular_vel_apriori_particlewise_2_200", "mi_angular_vel_apriori_particlewise", d(n_slices=1, n_agents=2, oversample=200)),
]

no_stats = []