Skip to content

Commit

Permalink
added week 3 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
VModugno committed Oct 14, 2024
1 parent 7b3441f commit b9a5460
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions week_3/BO_for_pid_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,10 @@ def objective(params):
kd = np.array(params[7:]) # Last 7 elements correspond to kd
episode_duration = 10

# Call the simulation with given kp and kd values
# TODO to remove for final version
tracking_error = simulate_with_given_pid_values(sim, kp, kd, episode_duration)

# Collect data for the first kp and kd TODO to remove for final version
kp0_values.append(kp[0])
kd0_values.append(kd[0])
tracking_errors.append(tracking_error)
# TODO Call the simulation with given kp and kd values

# TODO Collect data for the first kp and kd


return tracking_error

Expand Down Expand Up @@ -153,7 +149,7 @@ def main():
space,
n_calls=10,
base_estimator=gp, # Use the custom Gaussian Process Regressor
acq_func='EI', # LCB': Lower Confidence Bound 'EI': Expected Improvement 'PI': Probability of Improvement
acq_func='EI', # TODO change this LCB': Lower Confidence Bound 'EI': Expected Improvement 'PI': Probability of Improvement
random_state=42)

# Extract the optimal values
Expand Down

0 comments on commit b9a5460

Please sign in to comment.