-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Logarithmic scale" is not actually logarithmic for sub-unit values #57
Comments
+1. Experiencing the exact same issue. @chihuahua @jart @dandelionmane Here are a few screenshots to demonstrate. The only thing log scale does here is zoom in slightly. |
Just found this: palantir/plottable#3348 Have we tried the |
Here's where Plottable uses the I'm trying to understand the motivation behind adjusting the log value in that manner. Specifically, why add a value to the log output that ranges from 1 (at x = 0) to 0 (at x = base). |
I think I understand the trade-offs now. log(x) goes to -infinity when x is 0, so the Plottable folks never let that happen by adding a Hence, we can't just set A solution to this issue must be more nuanced. We must multiply the x input values by some value (based on the magnitudes of the x values) before applying log. |
I think the main issue with a fully log scale is if you have both positive and negative values in your graph. The thing is that's very rare though, and log scale wouldn't make sense for a graph with positive and negative values anyway. What if we only enabled log scale on graphs where all of the values were positive? Should be fairly easy to get proper log scale in that case. Even if the Plottable library doesn't work on values less than 1, you can multiply all of the values by some large enough multiplier to get them all above 1 before passing them to Plottable (so if your values are 0.01, 0.02, 0.03, just pass in 1, 2, 3). |
I don't see what the problem is with using an actual normal log scale. Users know whether their data is appropriate to be visualized on a log scale. If the user selects "log scale," then they know that their data is all positive. If charts "look crazy due to extremely negative outputs," this means that you have data very close to zero. When using a linear scale, the data will look like a perfectly flat line. You get no information out of such a chart. If you use a proper log scale and see extremely negative outputs, then you are learning exactly what you wanted to about your data. "If you have both positive and negative values in your graph," then you just shouldn't use a log scale. It's not the right tool for the job in that case. On the other hand, this pseudolinear scale that we currently use is never the right tool for the job. I am very wary of "multiply[ing] the x input values by some value based on their magnitudes" before taking their logarithms. The goal of the chart is not to create a pretty line; it is to display the user's data. Distorting the data is obviously incorrect. As long as TensorBoard does not crash when the plot has negative values (preferably show NaN-triangles in the graph; alternately show an error or something), it seems clear that using a log scale when the user asks for a log scale is the right way to go. For a point of reference, open any other application that plots data: Excel, Sheets, gnuplot, pgfplots, octave, matplotlib. I guarantee you that if you select a log scale on any of them, you will get a log scale. |
I agree. I don't mean that TensorBoard should display multiplied values to the user, but that it should find some sort of workaround rather than just be incorrect when values are less than 1. Another possibility if I understand the code correctly is to set |
It was pointed out that #938 is a duplicate of this older issue. There's some valuable more recent discussion on #938 but we're centralizing on this issue for tracking purposes. I've marked this contributions welcome, since we are stretched thin in terms of our ability to do new feature work right now. That said, I agree that this should be fixed and we would happily take a PR to replace the ModifiedLog scale with a true log scale as long as it has some reasonable provision for negative values (like the matplotlib style here: #938 (comment)). |
Migrated from tensorflow/tensorflow#7060.
@untom says:
I'll add that very often these are precisely the plots that we're interested in, so I consider this a pretty important issue.
The text was updated successfully, but these errors were encountered: