Skip to content

Regarding ex-5(week 6) - validationCurve #4

Description

@SehgalDivij

In week 6 - exercise 5 - validationCurve.m could you explain why your code works and this doesn't:

for i=1:length(lambda_vec)
	lambda = lambda_vec(i);
	theta = trainLinearReg(X, y, lambda);
	error_train(i) = linearRegCostFunction(X, y, theta, lambda);
	error_val(i) = linearRegCostFunction(Xval, yval, theta, lambda);
end

The above snippet makes perfect sense to me, but it isn't correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions