Skip to content

Conversation

andrey-shulika
Copy link

@andrey-shulika andrey-shulika commented Jul 24, 2025

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 adjustment correction = 1 + np.log(2 / alpha - 1) / model_y.theta[0] inside util.plot(), whereas in 2018 they do not. So your original solution was correct in this case. I’ve updated the pull request accordingly.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant