Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions research/legacy_skatervaluation/battlelatex/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def leaderboard_to_latex(leaderboard, caption, label, max_rows=42):
'_emp':' empirical ',
'_ppo':' ',
'_r':' r=0.',
'_g025': ' \gamma=0.5',
'_g050':' \gamma=0.5',
'_g100': ' \gamma=1',
'_g025': ' \\gamma=0.5',
'_g050':' \\gamma=0.5',
'_g100': ' \\gamma=1',
'_l010': ' r_l=0.01',
'_l020': ' r_l=0.02',
'_l050': ' r_l=0.05',
Expand Down
4 changes: 2 additions & 2 deletions research/legacy_skatervaluation/battleutil/interpretingelo.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def infer_categorical_and_ordinal(elos):
for wd in name_words:
for r_old, r_new in MODEL_KEY_REPLACEMENTS.items():
wd = wd.replace(r_old, r_new)
wd_head = re.search("[^\d]*", wd).group()
wd_head = re.search("[^\\d]*", wd).group()
if wd == wd_head:
if wd not in MODEL_KEYS_NOT_USED:
categorical.add(wd_head)
Expand All @@ -111,7 +111,7 @@ def make_model_regs_elo(elos, categorical, ordinal):
if wd in categorical:
pair = (wd+'_hot',1)
else:
wd_head = re.search("[^\d]*", wd).group()
wd_head = re.search("[^\\d]*", wd).group()
if wd_head in categorical:
pair = (wd+'_hot',1)
elif wd_head in ordinal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def moment_plot(moments: dict, sty='go'):
normalized_moments = dict([(k, v / moments['g000']) for k, v in moments.items()])
moment_plot(moments=normalized_moments, sty=sty)

plt.title('Portfolio variance as $\gamma$ is varied')
plt.title('Portfolio variance as $\\gamma$ is varied')
full_xlabel = xlabel + ' benefit=' + str(round(np.mean(bps))) + ' bps'
plt.xlabel(full_xlabel)
plt.show()
Expand Down