View source: R/sigopt_api_wrapper.R
create_observation | R Documentation |
Create an observation for an experiment
create_observation(experiment_id, body)
experiment_id |
the id of an experiment to create an observation for |
body |
POST body of create request |
observation created by SigOpt
env <- Sys.getenv("NOT_CRAN")
if (!identical(env, "true")) {
0
} else {
experiment <- create_experiment(list(
name="R test experiment",
parameters=list(
list(name="x1", type="double", bounds=list(min=0, max=100)),
list(name="x2", type="double", bounds=list(min=0, max=100))
)
))
suggestion <- create_suggestion(experiment$id)
create_observation(experiment$id, list(suggestion=suggestion$id, value=99.08))
create_observation(experiment$id, list(suggestion=suggestion$id, value=99.58, value_stddev=0.1))}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.