We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@sumny How to access the model when trained this way?
data = data.table( x1 = c(3000, 4000, 5000, 4500), x2 = c(2000, 3000, 4000, 3500), x3 = c(1, 2, 3, 2), y1 = c(2.0, 3.0, 4.0, 3.5), y2 = c(1.0, 2.0, 3.0, 2.5)) domain = ps(x1 = p_int(lower = 2000, upper = 5500), x2 = p_int(lower = 1000, upper = 20000), x3 = p_int(lower = 1, upper = 10)) codomain = ps(y1 = p_int(tags = "minimize"), y2 = p_dbl(tags = "minimize")) archive = Archive$new(search_space = domain, codomain = codomain) archive$add_evals(xdt = data[, c("x1", "x2", "x3")], ydt = data[, c("y1","y2")]) surrogate = srlrn(list(default_gp(), default_gp()), archive = archive) acq_function = acqf("ehvi", surrogate = surrogate) acq_optimizer = acqo( opt("focus_search", n_points = 1000, maxit = 10), terminator = trm("evals", n_evals = 11000), acq_function = acq_function) set.seed(42) acq_function$surrogate$update() acq_function$update() candidate = acq_optimizer$optimize() candidate # model <- acq_function$surrogate$model$model
Usually for single-objective, I can the extract the model via model <- acq_function$surrogate$model$model but that returns null in this case.
model <- acq_function$surrogate$model$model
The text was updated successfully, but these errors were encountered:
@hududed In v0.2.1 the $model field was changed to the $learner field to be more consistent (see https://github.com/mlr-org/mlr3mbo/blob/main/NEWS.md)
$model
$learner
acq_function$surrogate$learner will return a list of learners for each of the objectives you are modeling in your multi-objective scenario.
acq_function$surrogate$learner
Then, acq_function$surrogate$learner$y1$model allows for accessing the actual trained model for your first objective y1.
acq_function$surrogate$learner$y1$model
y1
Sorry, something went wrong.
No branches or pull requests
@sumny How to access the model when trained this way?
Usually for single-objective, I can the extract the model via
model <- acq_function$surrogate$model$model
but that returns null in this case.The text was updated successfully, but these errors were encountered: