开发者

Multilinear Regression using OLS in Python not working with my own data [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Python Multiple Linear Regression using OLS code with specific data?

开发者_运维问答Alright, I'm working with ols.py from scipy.org. When I input my own variables and try to initiate a multilinear regression, I'm getting an error.

Every time I try to put my variables in place of the random variables that came with ols.py, it gives me an error.

For a good view on my error, I pasted the code on: http://pastebin.com/PGZvEUWn

The error is found on this line:

m = ols(y, x, y_varnm = 'y',x_varnm = ['x1','x2','x3'])

The error is writing:

TypeError: this constructor takes no arguments

Any help would be great. Thank you!


The code is right except for the indentation in the methods of the class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜