Skip to content
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

ex5-biasVSvariance的练习中moduleTNC.minimize报错 #85

Open
rrwang05 opened this issue Mar 30, 2021 · 0 comments
Open

ex5-biasVSvariance的练习中moduleTNC.minimize报错 #85

rrwang05 opened this issue Mar 30, 2021 · 0 comments

Comments

@rrwang05
Copy link

您好,练习5中的多项式特征大于2的时候,执行报错
X_poly, Xval_poly, Xtest_poly = prepare_poly_data(X, Xval, Xtest, power=8)
plot_learning_curve(X_poly, y, Xval_poly, yval, l=0)

linear_regression_np(X[:i, :], y[:i], l=1)
res = opt.minimize(fun=regularized_cost, x0=theta, args=(X, y, l), method='TNC', jac=regularized_gradient,
options={'disp': True})
File "", line 1, in
rc, nf, nit, x = moduleTNC.minimize(func_and_grad, x0, low, up, scale,
ValueError: tnc: invalid return value from minimized function.

能帮忙看一下吗?

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

No branches or pull requests

1 participant