ML之回归预测之BE:利用BE算法解决回归(实数值评分预测)问题—线性方法解决非线性问题

ML之回归预测之BE:利用BE算法解决回归(实数值评分预测)问题—线性方法解决非线性问题


输出结果

设计思路

代码实现

for row in xList:
    newRow = list(row)
    alch = row[alchCol - 1]
    newRow.append((alch - 7) * (alch - 7)/10)
    newRow.append(5 * log(alch - 7))
    newRow.append(cos(alch))
    xExtended.append(newRow)

nrow = len(xList)
v1 = [xExtended[j][alchCol - 1] for j in range(nrow)]

for i in range(4):
    v2 = [xExtended[j][alchCol - 1 + i] for j in range(nrow)]
    plot.scatter(v1,v2)
(0)

相关推荐