AttributeError: 'LinearRegression' object has no attribute 'tvalues'
时间: 2023-10-20 21:06:19 浏览: 157
Python3下错误AttributeError: ‘dict’ object has no attribute’iteritems‘的分析与解决
5星 · 资源好评率100%
This error occurs because the `LinearRegression` object in Python's scikit-learn library does not have a `tvalues` attribute. The `tvalues` attribute is commonly used in statistical analysis to calculate the t-statistic for a given variable or coefficient in a linear regression model.
To resolve this error, you might need to use a different library or method for calculating the t-values in your linear regression analysis. Alternatively, you could try to compute the t-values manually using the coefficients and standard errors from the `LinearRegression` model.
阅读全文