Skip to content

Commit

Permalink
Merge branch 'main' of github.com:guidj/rl-daaf into main
Browse files Browse the repository at this point in the history
  • Loading branch information
guidj committed Jun 12, 2024
2 parents 36eb8bf + 095c247 commit 7ec8efa
Show file tree
Hide file tree
Showing 144 changed files with 2,435 additions and 1,170 deletions.
605 changes: 461 additions & 144 deletions notebooks/daaf_analyses/control/exp-policycontrol-v1-s0-regret.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

285 changes: 123 additions & 162 deletions notebooks/daaf_analyses/control/exp-policycontrol-v1-s3-bestmethod.ipynb

Large diffs are not rendered by default.

234 changes: 108 additions & 126 deletions notebooks/daaf_analyses/control/exp-policycontrol-v1-s4-returnplots.ipynb

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 13 additions & 2 deletions notebooks/daaf_analyses/control/utils/dataproc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import collections
import copy
import importlib
import json
import os
import pathlib
import uuid
Expand All @@ -13,11 +14,12 @@
import scipy
import seaborn as sns
import tensorflow as tf
from daaf import estimator_metrics
from matplotlib import pyplot as plt
from scipy import stats
from statsmodels.stats import proportion

from daaf import estimator_metrics

ENVS_MAPPING = {
(
"IceWorld",
Expand Down Expand Up @@ -51,7 +53,7 @@
"GridWorld",
"P3VJZBIJ7PNUOFG2SCF532NH5AQ6NOBZEZ6UZNZ7D3AU3GQZSLKURMS2SRPEUF6O65F3ETJXEFNTR3UYS73TUCIIU3YIONXHAR6WE5A=",
): {
"args": '{"grid": "oooooooooooo\\noooooooooooo\\noooooooooooo\\nsxxxxxxxxxxg"}',
"args": '{"grid": "oooooooooooo\noooooooooooo\noooooooooooo\nsxxxxxxxxxxg"}',
"name": "4x12",
},
}
Expand Down Expand Up @@ -84,7 +86,16 @@ def simplify_meta(meta):
new_meta["policy_type"] = POLICY_NAMES[new_meta["policy_type"]]
return new_meta

# drop n-step SARSA experiments with different values for n-step
# and reward period;
def filter_experiment_configs(meta: Mapping[str, Any]):
algo_args = json.loads(meta["algorithm_args"])
if "nstep-sarsa" == meta["algorithm"] and meta["reward_period"] > 1:
return algo_args["nstep"] == meta["reward_period"]
return True

df_proc = copy.deepcopy(df_raw)
df_proc = df_proc[df_proc["meta"].apply(filter_experiment_configs)]
df_proc["meta"] = df_proc["meta"].apply(simplify_meta)
df_proc["method"] = df_proc["meta"].apply(get_method)
return df_proc
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,319 changes: 1,309 additions & 10 deletions notebooks/daaf_analyses/reward_estimation/reward-recovery-example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.15.3
current_version = 0.15.4
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion src/daaf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "guilherme"
__version__ = "0.15.3"
__version__ = "0.15.4"
__email__ = "guilherme@dsv.su.se"
__description__ = "RL DAAF experiments"
__uri__ = "https://github.com/dsv-data-science/rl-daaf"
Expand Down

0 comments on commit 7ec8efa

Please sign in to comment.