Skip to content

Commit

Permalink
correct "Doubel" to "Double"
Browse files Browse the repository at this point in the history
  • Loading branch information
ytetra committed Oct 31, 2018
1 parent cd694e2 commit 70e4941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/suggestion/hyperband_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/suggestion/random_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)]
}
Expand Down

0 comments on commit 70e4941

Please sign in to comment.