Description Usage Format Examples
Allows you to access Task attributes and perform all Task-related functions.
1 |
An object of class R6ClassGenerator
of length 24.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
task$id # The unique ID of the Task
task$json # The full JSON representation of the Task in OPTaaS
# To run your task:
# First define a scoring function whose arguments are identical to your parameter names.
# The function should return a score value
# Then to run the task for n iterations and store the best result:
best_result <- task$run(scoring_function, n)
# Or to run for at most n iterations, but stop when the score is X or better:
best_result <- task$run(scoring_function, n, X)
# Or if you prefer to do things manually:
configuration <- task$generate_configuration()
result <- Result$new(configuration=configuration, score=score, ...)
next_configuration <- task$record_result(result)
task$get_best_result() # Result with the best score (for single-objective tasks)
task$get_pareto_set() # Set of Pareto front results (for multi-objective tasks)
# To use batching (i.e. parallel score evaluation):
configurations <- task$generate_configurations(number_of_workers)
results <- your_parallel_scoring_function(configurations)
next_configurations <- task$record_results(results)
# Other functions:
task$add_user_defined_configuration() # Warm-start the optimization with pre-calculated results
task$get_results() # Get all recorded results
task$get_surrogate_predictions() # Get predicted scores for specific configurations
task$complete() # Complete the task (no more configurations or results can be added)
task$resume() # Resume a completed task
task$delete() # Delete the task
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.