question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

log_uniform min max unintuitive

See original GitHub issue

wandb, version 0.8.9 Python 3.7.4 Linux

Description

Currently Log uniform. Number between exp(min) and exp(max) so that the logarithm of the return value is uniformly distributed. While it should rather be distributed between min and max (keeping the meaning of the terms min and max) – my expectation would have been, if I want my learning rate between 1e-8 and 1, I can just tell it to be between 1e-8 and 1, but I actually have to convert it by taking the log of my desired values, passing min: -8 and max: 0, so that I get the scaling between 1e-8 and 1.

Solution: In the parsing of the function take the log of the min and max params.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:27
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
Danmoucommented, Oct 10, 2019

Note that you need to take the natural logarithm, so 1e-8 actually becomes -18.42. This is highly unintuitive!

9reactions
hu-pocommented, Apr 5, 2022

Documentation has been updated! Check out the three new distributions: log_uniform_values, q_log_uniform_values, and inv_log_uniform_values.

Read more comments on GitHub >

github_iconTop Results From Across the Web

log_uniform min max unintuitive · Issue #507 · wandb ... - GitHub
Description. Currently Log uniform. Number between exp(min) and exp(max) so that the logarithm of the return value is uniformly distributed.
Read more >
scipy.stats.loguniform — SciPy v1.9.3 Manual
As an instance of the rv_continuous class, loguniform object inherits from it a collection of generic methods (see below for the full list),...
Read more >
Why doesn't R use Inverse Transform Sampling to sample ...
I have run the same code on an Intel(R) Xeon CPU E5-2650L v4 @ 1.70GHz processor, Ubuntu OS, and GCC 7.5 compiler, with...
Read more >
Optimal data structures for stochastic driven simulations - Pure
A log-uniform distribution: a random variable is said to be log-uniformly distributed over the interval. [min, max] if its probability ...
Read more >
The Log Uniform Distribution - R-Project.org
Parameters min, max must be provided as raw (not log-transformed) values and will be log-transformed using base . In other words, when log-transformed,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found