Fixed incorrect "translation invariance" in problem in softmax-regression.md #2592
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.
Hello, when working through the exercises inside of softmax-regression.md I've noticed that one of the problem seems to have a small error, namely the function$g$ is not translation invariant, but rather translation equivariant. This means that there should be a $+b$ term outside of the function as well.
Also I've changed the sign of the b to align it closer to what should be done in the last subproblem: "Show that if we choose$b = \mathrm{max}_i x_i$ we end up with a numerically stable implementation."
As such the corrected version of the problem is$g(\underline{x} - b) = g(\underline{x}) - b$ .
Proof
Where we have used that (1)$\log(xy) = \log(x) + \log(y)$ and (2) $\log\exp x = x$ .
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.