Skip to content

2D: add 'aspect_ratio' attribute to deviate from fixed square scaling

Bas Nijholt requested to merge ratio_scaling into master

The 2D learner treats x and y on equal footing now.

An adaptive user sent me this:

IMAGE_2018-05-25_10_26_33

and a zoom in on the "interesting" features:

IMAGE_2018-05-25_10_27_49

where there is more detail in y than in x.

This merge request allows you to set a new attribute ratio.

Examples:

learner = adaptive.Learner2D(ring, bounds=[(-1, 1), (-1, 1)])
learner.aspect_ratio = 1/4

1_4

learner = adaptive.Learner2D(ring, bounds=[(-1, 1), (-1, 1)])
learner.aspect_ratio = 4

4

Edited by Bas Nijholt

Merge request reports