-
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
ML-Exercise2.ipynb正则化逻辑回归创建特征多项式小修改 #88
Comments
我发出 issues#110 后才看到你也发现了一样的问题, 但你这个修改完后的代码是不是不会达到题目中要求的最高6次幂,一共28维的X呢? 我在#110中的代码可以生成到最高6次幂,一共28维,但准确率只能达到80多% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
degree = 5
x1 = data2['Test 1']
x2 = data2['Test 2']
data2.insert(3, 'Ones', 1)
for i in range(1, degree):
# for j in range(0, i):#这里x2始终不能达到最高次幂,修改后就好了,修改后accuracy 可达97%
for j in range(0, i+1):
data2['F' + str(i) + str(j)] = np.power(x1, i-j) * np.power(x2, j)
The text was updated successfully, but these errors were encountered: