Skip to content

Commit 78240bd

Browse files
committed
Update config examples (#771)
Summary: Pull Request resolved: #771 Updated config examples to be more modern in its descriptions. Also added extra examples for new features Reviewed By: adellari Differential Revision: D72883100 fbshipit-source-id: 2c0a9e477c4b713c3038663bca6a2a77343d11fe
1 parent cad3ab3 commit 78240bd

8 files changed

Lines changed: 87 additions & 34 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
### Example config for a multi outcome experiment
2+
3+
[common]
4+
parnames = [freq, amp] # names of the parameters
5+
outcome_names = [detection, strength] # names of outcomes, needed for multioutcome
6+
outcome_types = [binary, continuous]
7+
stimuli_per_trial = 1
8+
strategy_names = [init_strat, opt_strat]
9+
10+
[freq]
11+
par_type = continuous
12+
lower_bound = 0
13+
upper_bound = 500
14+
15+
[amp]
16+
par_type = continuous
17+
lower_bound = 0
18+
upper_bound = 1
19+
20+
[init_strat]
21+
generator = SobolGenerator
22+
min_asks = 40
23+
24+
[opt_strat]
25+
generator = IndependentOptimizeAcqfGenerator # Used alongside independent gps model
26+
model = IndependentGPsModel
27+
min_asks = 1
28+
29+
[IndependentOptimizeAcqfGenerator]
30+
generators = [DetectionGen, StrengthGen] # A generator for each outcome, in order, defined using aliases
31+
32+
[DetectionGen] # Using aliases to define the objects
33+
class = OptimizeAcqfGenerator # Requires a class
34+
acqf = EAVC # Configured as normal
35+
36+
[EAVC]
37+
target = 0.75
38+
39+
[StrengthGen] # Using aliases to define the objects
40+
class = OptimizeAcqfGenerator # Requires a class
41+
acqf = qLogNoisyExpectedImprovement
42+
43+
[IndependentGPsModel]
44+
models = [GPClassificationModel, GPRegressionModel] # A model for each outcome, in order, can be aliases as above
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
### Example config for mixed likelihood constraints
2+
3+
[common]
4+
parnames = [par1, par2]
5+
strategy_names = [init_strat, opt_strat]
6+
stimuli_per_trial = 1
7+
outcome_types = [binary]
8+
9+
[par1]
10+
par_type = continuous
11+
lower_bound = 0
12+
upper_bound = 500
13+
14+
[par2]
15+
par_type = continuous
16+
lower_bound = 0
17+
upper_bound = 2
18+
19+
[init_strat]
20+
min_asks = 1
21+
generator = SobolGenerator
22+
23+
[opt_strat]
24+
min_asks = 1
25+
model = GPClassificationModel
26+
generator = OptimizeAcqfGenerator
27+
28+
[GPClassificationModel] # These types of constraints are only available for GPClassification
29+
constraint_locations = [[100, 0.4], [200, 1.0], [300, 1.5]] # Individual locations can be defined
30+
constraint_values = [1, 0.7, 0.3] # For each location, a specific value is needed, defined in the probability space
31+
constraint_strengths = [1e-3, 2e-3, 3e-3] # The strength of the constraints (the smaller the stronger), this is optional, without it, a heuristic is used
32+
constraint_factory = constraint_factory # Constraint factory can be defined to constraint a subspace
33+
34+
[constraint_factory] # Constraint factory is used to define constraints over a space
35+
constraint_lower = [[0, 0], [0, 0]] # The subspace is defined by coordinates
36+
constraint_upper = [[0, 2], [500, 0]] # Multiple subspaces can be defined
37+
constraint_values = [0.5, 0.5] # Each subspace needs a value
38+
constraint_strengths = [1e-2, 1e-2] # Each subspace can have an optional strength
39+
points_per_dim = 2 # The space is constructed via a grid of points, the more points the tighter the grid
40+
41+
[OptimizeAcqfGenerator]
42+
acqf = qLogNoisyExpectedImprovement

configs/nonmonotonic_optimization_example.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
### Example config for optimization from single observations without any
22
# monotonicity assumptions.
3-
# Assuming you are doing threshold estimation and the intensity dimension
4-
# is the final dimension, the only things that need to be changed for a
5-
# typical experiment are:
6-
# 1. parnames, lb and ub under [common], and optionally target.
7-
# 2. min_asks under init_strat
8-
# 3. min_asks under opt_strat.
93

104
## The common section includes global server parameters and parameters
115
## reused in multiple other classes

configs/ordinal_exploration_example.ini

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
### Example config for ordinal (likert) data
2-
# Assuming you are learning a latent value from k-point scores, the
3-
# only things that need to be changed for a
4-
# typical experiment are:
5-
# 1. parnames, lb and ub under [common], and optionally target.
6-
# 2. min_asks under init_strat
7-
# 3. n_levels under OrdinalLikelihood
2+
# Assuming you are learning a latent value from k-point scores
83

94
## The common section includes global server parameters and parameters
105
## reused in multiple other classes

configs/pairwise_al_example.ini

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
### Example config for optimization (tuning) from pairwise obsevations
2-
# The only things that need to be changed for a
3-
# typical experiment are:
4-
# 1. parnames, lb and ub under [common], and optionally target.
5-
# 2. min_asks under init_strat.
6-
# 3. min_asks under opt_strat.
72

83
## The common section includes global server parameters and parameters
94
## reused in multiple other classes

configs/pairwise_opt_example.ini

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
### Example config for active learning (JND estimation) from pairwise obsevations
2-
# The only things that need to be changed for a
3-
# typical experiment are:
4-
# 1. parnames, lb and ub under [common], and optionally target.
5-
# 2. min_asks under init_strat.
6-
# 3. min_asks under opt_strat.
72

83
## The common section includes global server parameters and parameters
94
## reused in multiple other classes

configs/regression_example.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
### Example config for optimization from single observations without any
22
# monotonicity assumptions.
3-
# Assuming you are doing threshold estimation and the intensity dimension
4-
# is the final dimension, the only things that need to be changed for a
5-
# typical experiment are:
6-
# 1. parnames, lb and ub under [common], and optionally target.
7-
# 2. min_asks under init_strat
8-
# 3. min_asks under opt_strat.
93

104
## The common section includes global server parameters and parameters
115
## reused in multiple other classes

configs/single_lse_example.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
### Example config for threshold estimation from single observations.
2-
# Assuming you are doing threshold estimation and the intensity dimension
3-
# is the final dimension, the only things that need to be changed for a
4-
# typical experiment are:
5-
# 1. parnames, lb and ub under [common], and optionally target.
6-
# 2. min_asks under init_strat
7-
# 3. min_asks under opt_strat.
82

93
## The common section includes global server parameters and parameters
104
## reused in multiple other classes

0 commit comments

Comments
 (0)