-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Incomplete code for Exercise 2 (Logistic Regression), Regularization #110
Comments
您的邮件我已经收到,我会尽快处理的,谢谢!
|
哒啦哒哒哒,收到啦!ps.这里是HFer_杨少
|
收到,谢谢!
|
您好! 已经收到您的邮件,我会尽快处理。祝身体健康,万事胜意!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the requirements of the exercise, the polynomial terms should be up to sixth power, which mean transformed into a 28-dimensional vector, but the code provided only consists 11 dimension. I found that this error occurs due to these code (generating polynomials) in the original script:
here I provided my code which could generate the right 28-dimensional vector, which higher the accuracy up to 83.05% (using sklearn package), while original code provided only hit 66.10% when only 11-d vector used as input
the result of my code also more readable, here is the column of the data after generated the 28-d vector:
data.columns
Index(['Ones', 'Test 1', 'Test 2', 'Accepted', 'x1^2_x2^0', 'x1^1_x2^1',
'x1^0_x2^2', 'x1^3_x2^0', 'x1^2_x2^1', 'x1^1_x2^2', 'x1^0_x2^3',
'x1^4_x2^0', 'x1^3_x2^1', 'x1^2_x2^2', 'x1^1_x2^3', 'x1^0_x2^4',
'x1^5_x2^0', 'x1^4_x2^1', 'x1^3_x2^2', 'x1^2_x2^3', 'x1^1_x2^4',
'x1^0_x2^5', 'x1^6_x2^0', 'x1^5_x2^1', 'x1^4_x2^2', 'x1^3_x2^3',
'x1^2_x2^4', 'x1^1_x2^5', 'x1^0_x2^6'],
dtype='object')
The text was updated successfully, but these errors were encountered: