-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
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
Suggest int parameter with step #98
Conversation
// StepIntUniformDistributionName is the identifier name of IntUniformDistribution | ||
const StepIntUniformDistributionName = "StepIntUniformDistribution" | ||
|
||
// StepIntUniformDistribution is a uniform distribution on integers. | ||
type StepIntUniformDistribution struct { | ||
// High is higher endpoint of the range of the distribution (included in the range). | ||
High int `json:"high"` | ||
// Low is lower endpoint of the range of the distribution (included in the range). | ||
Low int `json:"low"` | ||
// Step is a spacing between values. | ||
Step int `json:"step"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new distribution type to keep backward compatibility.
Benchmark result of sigopt/evalset/Ackley problem
Please refer to "A Strategy for Ranking Optimizers using Multiple Criteria" for the ranking strategy used in this report. Please expand here for more details.Table of ContentsOverall Results
Individual Results(1) Problem: sigopt/evalset/Ackley(dim=5)
SolversID: 79277b8469b8810702825f63c5b450bba72028be027598049d9b7a5d94ccd4cerecipe: {
"command": {
"path": "./tpe_solver",
"args": []
}
} specification: {
"name": "Goptuna (TPE)",
"attrs": {
"github": "https://github.com/c-bata/goptuna"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"CATEGORICAL",
"CONDITIONAL",
"CONCURRENT"
]
} ID: 3f8337a230f8a248b2222ad48cb65d6334b244dc5793727eaf280dcf9c08b732recipe: {
"random": {}
} specification: {
"name": "Random",
"attrs": {
"version": "kurobako_solvers=0.1.6"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"LOG_UNIFORM_DISCRETE",
"CATEGORICAL",
"CONDITIONAL",
"MULTI_OBJECTIVE",
"CONCURRENT"
]
} ProblemsID: f5a73e549969e72aaf6bfb7b92b4b824f86adf193a308383e29d6c8dea7fe3ferecipe: {
"sigopt": {
"name": "ACKLEY",
"dim": 5
}
} specification: {
"name": "sigopt/evalset/Ackley(dim=5)",
"attrs": {
"github": "https://github.com/sigopt/evalset",
"paper": "Dewancker, Ian, et al. \"A strategy for ranking optimization methods using multiple criteria.\" Workshop on Automatic Machine Learning. 2016.",
"version": "kurobako_problems=0.1.7"
},
"params_domain": [
{
"name": "p0",
"range": {
"type": "CONTINUOUS",
"low": -10.0,
"high": 30.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "p1",
"range": {
"type": "CONTINUOUS",
"low": -10.0,
"high": 30.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "p2",
"range": {
"type": "CONTINUOUS",
"low": -10.0,
"high": 30.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "p3",
"range": {
"type": "CONTINUOUS",
"low": -10.0,
"high": 30.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "p4",
"range": {
"type": "CONTINUOUS",
"low": -10.0,
"high": 30.0
},
"distribution": "UNIFORM",
"constraint": null
}
],
"values_domain": [
{
"name": "Objective Value",
"range": {
"type": "CONTINUOUS"
},
"distribution": "UNIFORM",
"constraint": null
}
],
"steps": 1
} StudiesID: 56dbe97b2b0b9aa62ca35370ecf9f61ec0f5a215074f5d8ecdf70b17ce188fbb
ID: e7386be274c1bfa828b7fffcf965be0c56c47a4e18d8566cfc83310946d19c14
|
Benchmark result of himmelblau function
Please refer to "A Strategy for Ranking Optimizers using Multiple Criteria" for the ranking strategy used in this report. Please expand here for more details.Table of ContentsOverall Results
Individual Results(1) Problem: Himmelblau Function
SolversID: 55d05ec1515f9127963f4269fdf631907f78c963bff02793ff8c76b987bc277drecipe: {
"command": {
"path": "./cma_solver",
"args": []
}
} specification: {
"name": "Goptuna (CMA-ES)",
"attrs": {
"github": "https://github.com/c-bata/goptuna"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"CATEGORICAL",
"CONDITIONAL",
"CONCURRENT"
]
} ID: 79277b8469b8810702825f63c5b450bba72028be027598049d9b7a5d94ccd4cerecipe: {
"command": {
"path": "./tpe_solver",
"args": []
}
} specification: {
"name": "Goptuna (TPE)",
"attrs": {
"github": "https://github.com/c-bata/goptuna"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"CATEGORICAL",
"CONDITIONAL",
"CONCURRENT"
]
} ID: 29b0b413e0e229de860c855bd7258ff2335c36821b0877f4c28fe96fc82afb3crecipe: {
"random": {}
} specification: {
"name": "Random",
"attrs": {
"version": "kurobako_solvers=0.1.4"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"LOG_UNIFORM_DISCRETE",
"CATEGORICAL",
"CONDITIONAL",
"MULTI_OBJECTIVE",
"CONCURRENT"
]
} ProblemsID: fa9f14b4a97956cc4d0dd6769e8548cd5a12ae28520361741d847bd67d1cc511recipe: {
"command": {
"path": "./himmelblau_problem",
"args": []
}
} specification: {
"name": "Himmelblau Function",
"attrs": {},
"params_domain": [
{
"name": "x1",
"range": {
"type": "CONTINUOUS",
"low": -4.0,
"high": 4.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "x2",
"range": {
"type": "CONTINUOUS",
"low": -4.0,
"high": 4.0
},
"distribution": "UNIFORM",
"constraint": null
}
],
"values_domain": [
{
"name": "Himmelblau",
"range": {
"type": "CONTINUOUS"
},
"distribution": "UNIFORM",
"constraint": null
}
],
"steps": 1
} StudiesID: 8fbd46ba92dfcba2c6fac15cb53a81d261f30a2a7993b48024a012dd774671b9
ID: d39fa90bc8984e8b3690e27b79ca195bce3500a8b5873d2908b98cb34d2cd554
ID: fdcb4ad678796c7c8110d1aba73c9e9a31816a93aef77b8e5c8658d67d206a53
|
Benchmark result of rosenbrock function
Please refer to "A Strategy for Ranking Optimizers using Multiple Criteria" for the ranking strategy used in this report. Please expand here for more details.Table of ContentsOverall Results
Individual Results(1) Problem: Rosenbrock Function
SolversID: 55d05ec1515f9127963f4269fdf631907f78c963bff02793ff8c76b987bc277drecipe: {
"command": {
"path": "./cma_solver",
"args": []
}
} specification: {
"name": "Goptuna (CMA-ES)",
"attrs": {
"github": "https://github.com/c-bata/goptuna"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"CATEGORICAL",
"CONDITIONAL",
"CONCURRENT"
]
} ID: 79277b8469b8810702825f63c5b450bba72028be027598049d9b7a5d94ccd4cerecipe: {
"command": {
"path": "./tpe_solver",
"args": []
}
} specification: {
"name": "Goptuna (TPE)",
"attrs": {
"github": "https://github.com/c-bata/goptuna"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"CATEGORICAL",
"CONDITIONAL",
"CONCURRENT"
]
} ID: 29b0b413e0e229de860c855bd7258ff2335c36821b0877f4c28fe96fc82afb3crecipe: {
"random": {}
} specification: {
"name": "Random",
"attrs": {
"version": "kurobako_solvers=0.1.4"
},
"capabilities": [
"UNIFORM_CONTINUOUS",
"UNIFORM_DISCRETE",
"LOG_UNIFORM_CONTINUOUS",
"LOG_UNIFORM_DISCRETE",
"CATEGORICAL",
"CONDITIONAL",
"MULTI_OBJECTIVE",
"CONCURRENT"
]
} ProblemsID: 52cccf44ea75f7b3ffac45f5590f4957c127439c3a1685179124a94a06e16b64recipe: {
"command": {
"path": "./rosenbrock_problem",
"args": []
}
} specification: {
"name": "Rosenbrock Function",
"attrs": {},
"params_domain": [
{
"name": "x1",
"range": {
"type": "CONTINUOUS",
"low": -5.0,
"high": 10.0
},
"distribution": "UNIFORM",
"constraint": null
},
{
"name": "x2",
"range": {
"type": "CONTINUOUS",
"low": -5.0,
"high": 10.0
},
"distribution": "UNIFORM",
"constraint": null
}
],
"values_domain": [
{
"name": "Rosenbrock",
"range": {
"type": "CONTINUOUS"
},
"distribution": "UNIFORM",
"constraint": null
}
],
"steps": 1
} StudiesID: 49f9ee312dfcca494dca8fb37a2b167ecaa24509a795ae24efb7f1c695ac6da9
ID: 9393401716052aeaafc25616db33049d94c0cd2884bc6becab4e0dca520536f9
ID: 0a0b6c449c4456a2f1e8d0e919c0c8e6ccaf2d274ec43075abb065facdd30861
|
package main
import (
"fmt"
"log"
"math"
"github.com/c-bata/goptuna"
"github.com/c-bata/goptuna/tpe"
)
func objective(trial goptuna.Trial) (float64, error) {
x1, _ := trial.SuggestUniform("x1", -10, 10)
x2, _ := trial.SuggestIntWithStep("x2", -10, 10, 4)
fmt.Println("x1:", x1, "x2:", x2)
return math.Pow(x1-2, 2) + math.Pow(float64(x2)+5, 2), nil
}
func main() {
study, err := goptuna.CreateStudy(
"goptuna-example",
goptuna.StudyOptionSampler(tpe.NewSampler()),
)
if err != nil {
log.Fatal("failed to create study:", err)
}
if err = study.Optimize(objective, 25); err != nil {
log.Fatal("failed to optimize:", err)
}
v, _ := study.GetBestValue()
params, _ := study.GetBestParams()
log.Printf("Best evaluation=%f (x1=%f, x2=%d)",
v, params["x1"].(float64), params["x2"].(int))
} TPE
CMA-ES
|
Refs: optuna/optuna#910