Bender {bender}R Documentation

Bender Client

Description

The Bender Class. Provides an interface to the Bender API. The goal with this client is to feed Bender with various trials. Doing so, he will be more and more precise in the suggestions of hyperparameters set he makes.

Details

/!\ For fully detailed documentation on slots and methods, please visit https://bender-optimizer.readthedocs.io/en/latest/index.html

Slots

mail Mail of connected user.

token A unique JWT associated to your current session.

experiment The experiment object.

algo The algo object.

Methods

$new(mail, password) Initialize a Bender object and establish connection to the API.

$list_experiments() Return a list of the connected user’s experiments.

$set_experiment(name=NULL, id=NULL) Setup current experiment for the connected user.

$create_experiment(name, metrics, description=NULL, dataset=NULL, dataset_parameters=NULL) Create new experiment and setup current experiment for the connected user. If experiment name already exists, the already existing one is set by default as current experiment.

$delete_experiment(id) Delete targeted experiment of the connected user.

$list_algos() Return a list of the connected user’s algos.

$set_algo(id=NULL, name=NULL) Setup current algo for the connected user.

$set_algo(name, hyperparameters, description=NULL) Create new algo and setup current algo for the connected user. If algo name already exists, the already existing one is set by default as current algo.

$delete_algo(id) Delete targeted algo of the connected user.

$list_trials() List all trials of the current algo.

$create_trial(results, hyperparameters, weight=1, comment=NULL) Create new trial for the current algo.

$delete_trial(id) Delete targeted trial from current algo.

$suggest(metric=NULL, optimizer="parzen_estimator") Ask bender a suggestion on a hyperparameters set to use

$delete_trial(id) Delete targeted trial from current algo.

Examples

## Not run: 
my_optimization_problem <-function(data, hyperparameters) {
Do your magic here...
return(list(perform=0.3))
}

bender = Bender$new("my_bender_mail", "my_secret_password")

bender$set_algo(id="88155b59-aca1-4cb1-898c-25d942c02859")

suggested_hyperparameters <- bender$suggest(metric="accuracy")
results <- my_optimization_problem(my_data, suggested_hyperparameters)
bender$create_trial(list(accuracy=results.perform), suggested_hyperparameters)

## End(Not run)


[Package bender version 0.1.1 Index]