Value error #640
Replies: 1 comment
-
Hi @allenmoench, I will need some more information to help with this. I'm assuming you are using the That said, I am guessing that the problem has to do with the shape of your data. Specifically, if you are using two predictor variables (as it looks like you are doing here), you may need to transpose them so that their dimensions are (2, 68) instead. The reason for this has to do with matrix multiplication, which is used in fitting statistical models, and which requires that the number of rows in the first matrix matches the number of columns in the second. These libraries usually handle 1D arrays pretty well, but need you to reshape 2D arrays. The easiest way to transpose is with Perhaps you are including extra columns in your observed and predicted variables? If that's the case, make sure that you get the individual column out of the DataFrame! It's ok to have an index, usually. Take a look at the values of |
Beta Was this translation helpful? Give feedback.
-
Hello! Trying to figure out why the final model summary for the linear regression on my climate analysis won't print. I'm getting "ValueError: shapes (68,2) and (68,2) not aligned: 2 (dim 1) != 68 (dim 0)"
Anyone know what this is about? Here's the code:
Beta Was this translation helpful? Give feedback.
All reactions