Skip to content

Commit

Permalink
updated examples to use new estimators
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaspear committed Jul 17, 2024
1 parent 63e0775 commit a1a86b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions examples/static_torch_deterministic_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from offline_rl_ope.components.Policy import Policy, GreedyDeterministic
from offline_rl_ope.components.ImportanceSampler import ISWeightOrchestrator
from offline_rl_ope.OPEEstimators import (
ISEstimator, DREstimator, D3rlpyQlearnDM)
ISEstimator, WDR, D3rlpyQlearnDM)
from offline_rl_ope.PropensityModels.torch import FullGuassian, TorchRegTrainer
from offline_rl_ope.LowerBounds.HCOPE import get_lower_bound

Expand Down Expand Up @@ -176,9 +176,9 @@ def __call__(
wis_estimator_smooth = ISEstimator(norm_weights=True, norm_kwargs={
"smooth_eps":0.0000001
})
w_dr_estimator = DREstimator(
dm_model=fqe_dm_model, norm_weights=True,
ignore_nan=True)
w_dr_estimator = WDR(
dm_model=fqe_dm_model,
)


res = is_estimator.predict(
Expand Down
8 changes: 4 additions & 4 deletions examples/static_torch_stochastic_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from offline_rl_ope.components.Policy import Policy
from offline_rl_ope.components.ImportanceSampler import ISWeightOrchestrator
from offline_rl_ope.OPEEstimators import (
ISEstimator, DREstimator, D3rlpyQlearnDM)
ISEstimator, WDR, D3rlpyQlearnDM)
from offline_rl_ope.PropensityModels.torch import FullGuassian, TorchRegTrainer
from offline_rl_ope.LowerBounds.HCOPE import get_lower_bound

Expand Down Expand Up @@ -158,9 +158,9 @@
wis_estimator_smooth = ISEstimator(norm_weights=True, norm_kwargs={
"smooth_eps":0.0000001
})
w_dr_estimator = DREstimator(
dm_model=fqe_dm_model, norm_weights=True,
ignore_nan=True)
w_dr_estimator = WDR(
dm_model=fqe_dm_model
)


res = is_estimator.predict(
Expand Down
8 changes: 4 additions & 4 deletions examples/static_xgboost_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
GreedyDeterministic, Policy, NumpyPolicyFuncWrapper)
from offline_rl_ope.components.ImportanceSampler import ISWeightOrchestrator
from offline_rl_ope.OPEEstimators import (
ISEstimator, DREstimator, D3rlpyQlearnDM)
ISEstimator, WDR, D3rlpyQlearnDM)
from offline_rl_ope.PropensityModels.sklearn import (
SklearnDiscrete)
from offline_rl_ope.LowerBounds.HCOPE import get_lower_bound
Expand Down Expand Up @@ -123,9 +123,9 @@
wis_estimator_smooth = ISEstimator(norm_weights=True, norm_kwargs={
"smooth_eps":0.0000001
})
w_dr_estimator = DREstimator(
dm_model=fqe_dm_model, norm_weights=True,
ignore_nan=True)
w_dr_estimator = WDR(
dm_model=fqe_dm_model
)


res = is_estimator.predict(
Expand Down

0 comments on commit a1a86b0

Please sign in to comment.