Conversation
On a log scale a size is a factor rather than an offset, so sigma is a geometric standard deviation: sigma=2 asks for a two-fold spread. UnitScaler.vectorize_size added the lower bound to sigma before taking the logarithm, which made the achieved spread depend on where the range starts. A requested factor of 2 came out as 2.5 on [0.5, 5000] and as 12 on [10, 100000], and the distribution collapsed to a point mass at sigma = 1 - lower, where the numerator is zero and truncnorm divides by it. Dropping the offset makes sigma exactly the geometric standard deviation on any range. The linear branch is unchanged. Four existing expectations in test_hyperparameters.py encoded the old values. Each compares a log-scaled hyperparameter built as the exponential of a linear one -- lower=exp(0), upper=exp(10), mu=exp(3), sigma=exp(2) against 0, 10, 3, 2 -- so the two should agree, and with this change they do to fifteen significant figures. The stored numbers were up to a factor of two out.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log scaled hyperparameters' sigmas are dependent on lower bound. I think this is erroneous, so I removed it and added a test for independence. Fixes issue #431