From 70e4941d6b4ce51682300fd26a0623eb55091812 Mon Sep 17 00:00:00 2001 From: ytetra Date: Wed, 31 Oct 2018 11:04:52 +0900 Subject: [PATCH] correct "Doubel" to "Double" --- pkg/suggestion/hyperband_service.go | 2 +- pkg/suggestion/random_service.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/suggestion/hyperband_service.go b/pkg/suggestion/hyperband_service.go index 8adba615bb5..f5f07cf03d1 100644 --- a/pkg/suggestion/hyperband_service.go +++ b/pkg/suggestion/hyperband_service.go @@ -108,7 +108,7 @@ func (h *HyperBandSuggestService) makeMasterBracket(ctx context.Context, c api.M case api.ParameterType_DOUBLE: dmin, _ := strconv.ParseFloat(pc.Feasible.Min, 64) dmax, _ := strconv.ParseFloat(pc.Feasible.Max, 64) - t.ParameterSet[j].Value = strconv.FormatFloat(h.DoubelRandom(dmin, dmax), 'f', 4, 64) + t.ParameterSet[j].Value = strconv.FormatFloat(h.DoubleRandom(dmin, dmax), 'f', 4, 64) case api.ParameterType_CATEGORICAL: t.ParameterSet[j].Value = pc.Feasible.List[h.IntRandom(0, len(pc.Feasible.List)-1)] } diff --git a/pkg/suggestion/random_service.go b/pkg/suggestion/random_service.go index 125624f0b75..814ec6a7c52 100644 --- a/pkg/suggestion/random_service.go +++ b/pkg/suggestion/random_service.go @@ -19,7 +19,7 @@ func NewRandomSuggestService() *RandomSuggestService { return &RandomSuggestService{} } -func (s *RandomSuggestService) DoubelRandom(min, max float64) float64 { +func (s *RandomSuggestService) DoubleRandom(min, max float64) float64 { if min == max { return min } @@ -65,7 +65,7 @@ func (s *RandomSuggestService) GetSuggestions(ctx context.Context, in *api.GetSu case api.ParameterType_DOUBLE: dmin, _ := strconv.ParseFloat(pc.Feasible.Min, 64) dmax, _ := strconv.ParseFloat(pc.Feasible.Max, 64) - sT[i].ParameterSet[j].Value = strconv.FormatFloat(s.DoubelRandom(dmin, dmax), 'f', 4, 64) + sT[i].ParameterSet[j].Value = strconv.FormatFloat(s.DoubleRandom(dmin, dmax), 'f', 4, 64) case api.ParameterType_CATEGORICAL: sT[i].ParameterSet[j].Value = pc.Feasible.List[s.IntRandom(0, len(pc.Feasible.List)-1)] }