Bayesian Optimization

No algorithm description given

This algorithm performs Bayesian optimization to automatically set the hyperparameters of a machine learning algorithm for good performance on a training dataset (as measured by performance on a validation set).  Users must pass in three or optionally four things:  the name of an Algorithmia algorithm that takes in ONLY the hyperparameters to be optimized and returns a number that should be minimized (for supervised learning tasks, this could be the error on the validation data after training on the training data with the hyperparameters supplied).  All other parameters must be supplied manually.  For many algorithms on the system that probably return either a trained model or predictions for input data, this will necessitate the writing of a short wrapper function.   the number of jobs Bayesian optimization should run (i.e. times to call the Hyperparameters --> Function Value to Minimize algorithm). the path to a data collection containing a config file.  This is a json file with the format config_<ALGORITHM_NAME>.json (not including the username of the algorithm creator), which for each variable must contain: the variable name, type (int, float, etc.), minimum value, maximum value, and number (if the user has, say, 2 variables with the exact same specifications, they can make this number 2 (otherwise it should be 1) instead of making duplicate entries).   optionally, the data collection path to write a results file (which will be titled results_<ALGORITHM_NAME>.dat) containing the results (function value and time taken) and hyperparameter settings of all jobs run for further analysis.  If this value is not supplied, by default it will write to the same collection as the config file.   After Bayesian optimization is performed, the results of the best job (job number, time, and function value--plus hyperparameter settings) will be returned in JSON format, while as mentioned above the results of all jobs will be written in a file to a data collection. Note about the sample input: probably more jobs should be run to achieve better results.  This number of jobs was chosen so it would finish quickly while still illustrating the format of the sample output.  

(no tags)

Cost Breakdown

0 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
API calls
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.

To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY'
View cURL Docs
algo auth
algo run algo://mheimann/BayesianOptimization/0.1.1 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import (
  algorithmia ""

input := {{input | formatInput:"go"}}

var client = algorithmia.NewClient("YOUR_API_KEY", "")
algo, _ := client.Algo("algo://mheimann/BayesianOptimization/0.1.1")
resp, _ := algo.Pipe(input)
response := resp.(*algorithmia.AlgoResponse)
View Go Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://mheimann/BayesianOptimization/0.1.1");
AlgoResponse result = algo.pipeJson(input);
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://mheimann/BayesianOptimization/0.1.1")
val result = algo.pipeJson(input)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(output) {
View Javascript Docs
using Algorithmia;

var input = "{{input | formatInput:"cs"}}";
var client = new Client("YOUR_API_KEY");
var algorithm = client.algo("algo://mheimann/BayesianOptimization/0.1.1");
var response = algorithm.pipe<object>(input);
View .NET/C# Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(response) {
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('mheimann/BayesianOptimization/0.1.1')
print algo.pipe(input)
View Python Docs

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("mheimann/BayesianOptimization/0.1.1")
result <- algo$pipe(input)$result
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('mheimann/BayesianOptimization/0.1.1')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::Algorithmia;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo("mheimann/BayesianOptimization/0.1.1");
let response = algo.pipe(input);
View Rust Docs
import Algorithmia

let input = "{{input | formatInput:"swift"}}";
let client = Algorithmia.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "mheimann/BayesianOptimization/0.1.1") { resp, error in
View Swift Docs
  • {{comment.username}}