You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this can help to figure out what is wrong.
the total dataset has 1004 rows
I try to pass 105 independent variables, which means X_train shows (803, 105).
After I use the model = GWR(coords_train, y_train, X_train, gwr_bw), I use model.X.shape to check the independent variables, and it changes to (803, 103).
I don't know why it misses 2 columns, and I think that is why they can not match with 106. model.P.shape(201, 106)
The data I use contains 3 columns with 0 values and they present some characteristics with other columns.
After I delete these columns, the code pred_results.predictions works well and it can return an array.
I assume that in the GWR, it will automatically delete some columns that only contain zero values. Is it correct? and will this lose some data features and lead to inaccurate results?
Thank the development team for providing us with the package!
I follow the tutorial in (https://pysal.org/notebooks/model/mgwr/GWR_prediction_example.html)
using gaopandas and sample to split the test and train set.
Currently, it works well. But when I want to print the prediction result.
it shows the
Caution
ValueError: operands could not be broadcast together with shapes (201,106) (201,103)
How to fix it, I want to check the R2 of the predicted results.
The text was updated successfully, but these errors were encountered: