我在调整方程时遇到了问题 y=b0+b1x1+b2x2
代码:
xs = numpy.loadtxt('teste.csv', skiprows=1, dtype=float, delimiter=';',
usecols=(0,1))
y = log(xs[:,0])
x = 1/xs[:,1]
x2 = (1/xs[:,1])**2
mymodel = ols.ols(y,x,'y',['x1', 'x2'])
mymodel.summary()`
我有个错误:
print '''% -5s % -5.6f % -5.6f % -5.6f % -5.6f''' % tuple([self.x_varnm[i],self.b[i],self.se[i],self.t[i],self.p[i]])
IndexError: index out of bounds
有人能帮我吗?你知道吗
尝试将
x
定义为:您告诉
ols
期望x
有一个两列的矩阵,但是传入了一个,因此出现了错误。你知道吗相关问题 更多 >
编程相关推荐