We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 805a22b commit 522a91fCopy full SHA for 522a91f
test/dynamic_assortment.jl
@@ -0,0 +1,25 @@
1
+@testitem "DVSP" begin
2
+ using DecisionFocusedLearningBenchmarks
3
+ using Statistics: mean
4
+
5
+ b = DynamicAssortmentBenchmark()
6
7
+ @test is_endogenous(b)
8
+ @test !is_exogenous(b)
9
10
+ dataset = generate_dataset(b, 10; seed=0)
11
+ environments = generate_environments(b, dataset)
12
13
+ env = environments[1]
14
+ get_seed(env)
15
+ env.seed
16
17
+ policies = generate_policies(b)
18
+ expert = policies[1]
19
+ greedy = policies[2]
20
21
+ r_expert, _ = evaluate_policy!(expert, environments)
22
+ r_greedy, _ = evaluate_policy!(greedy, environments)
23
24
+ @test mean(r_expert) >= mean(r_greedy)
25
+end
0 commit comments