Issues with modified LinearRegression class
I am having two issues with the modified LinearRegression class you provided.
- when I try it with my own data, it gives an error as below:
Here's the data.head()
2) Second, with the provided data, I can extract the t-values with the following command but the structure of the array looks different from the one for p-values. Thus, it doesn't work when I try to add it to the output summary table.
reg_with_pvalues.t
Any help appreciated.
1 answers ( 0 marked as helpful)
Hey Jahurul,
Thank you for your question!
Regarding the firs problem, the error on your screenshot states that stat
is not defined. Are you sure you have imported the scipy.stats
library as stat
before defining the LinearRegression()
class?
Regarding the second problem, you can reshape the array as follows:
Hope this helps!
Kind regards,
365 Hristina