Open yangzilongdmgy opened 3 years ago
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+1): data2['F' + str(i) + str(j)] = np.power(x1, i-j) * np.power(x2, j)
我发出 issues#110 后才看到你也发现了一样的问题, 但你这个修改完后的代码是不是不会达到题目中要求的最高6次幂,一共28维的X呢?
我在#110中的代码可以生成到最高6次幂,一共28维,但准确率只能达到80多%
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%