Skip to content

Commit

Permalink
Fix plot_contour for choice parameters (#69)
Browse files Browse the repository at this point in the history
Summary:
These indices are flipped--the value we want is the actual parameter value, not the number of occurrences.

Fixes #68
Pull Request resolved: #69

Reviewed By: amurthy1

Differential Revision: D15192619

Pulled By: sdsingh

fbshipit-source-id: 28445e1f8e263e35151e1b20a140b59357c949de
  • Loading branch information
Shaun Singh authored and facebook-github-bot committed May 3, 2019
1 parent 2d75ae4 commit 2366524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ax/plot/helper.py
Expand Up @@ -400,7 +400,7 @@ def get_fixed_values(
if isinstance(parameter, FixedParameter):
setx[p_name] = parameter.value
elif isinstance(parameter, ChoiceParameter):
setx[p_name] = Counter(vals).most_common(1)[0][1]
setx[p_name] = Counter(vals).most_common(1)[0][0]
elif isinstance(parameter, RangeParameter):
setx[p_name] = parameter._cast(np.mean(vals))

Expand Down

0 comments on commit 2366524

Please sign in to comment.