Corrected mistakes in the solution of ps1 q2(d)-(e)#12
Open
andrey-shulika wants to merge 1 commit intomaxim5:mainfrom
Open
Corrected mistakes in the solution of ps1 q2(d)-(e)#12andrey-shulika wants to merge 1 commit intomaxim5:mainfrom
andrey-shulika wants to merge 1 commit intomaxim5:mainfrom
Conversation
In part (d), the plot should use the t labels instead of the y labels. In part (e), alpha should be calculated by averaging only on V_+, not on V.
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.
In part (d), the plot should use the t labels instead of the y labels. The idea is to demonstrate the poor performance of the naive approach of predicting t by using just the y labels. In the summer 2020 edition of this question they wrote the instructions more clearly ("even though we only used the y(i) labels for training, use the true t(i) labels for plotting").
In part (e), alpha should be calculated by averaging only on V_+ (the part of the validation set where y=1), not on all of V. Also, the correction term for the plot should be just alpha. This corresponds to the line h(x) = alpha / 2.
Update: I looked into the implementation of
util.plot(), and noticed that it differs from the summer 2020 edition. In 2020, they apply the adjustmentcorrection = 1 + np.log(2 / alpha - 1) / model_y.theta[0]insideutil.plot(), whereas in 2018 they do not. So your original solution was correct in this case. I’ve updated the pull request accordingly.