We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I used the following codes to do the bandwidth selection for GWR Poisson but got an error saying "local variable 'aicc' referenced before assignment"
import libpysal as ps from mgwr.sel_bw import Sel_BW import numpy as np from spglm.family import Poisson data = ps.io.open(ps.examples.get_path('GData_utm.csv')) coords = list(zip(data.by_col('X'), data.by_col('Y'))) y = np.array(data.by_col('PctBach')).reshape((-1,1)) rural = np.array(data.by_col('PctRural')).reshape((-1,1)) pov = np.array(data.by_col('PctPov')).reshape((-1,1)) african_amer = np.array(data.by_col('PctBlack')).reshape((-1,1)) X = np.hstack([rural, pov, african_amer]) bw = Sel_BW(coords, y, X, kernel='gaussian', family = Poisson).search(criterion='AICc')
The text was updated successfully, but these errors were encountered:
for the last step, add a bracket after Poisson: bw = Sel_BW(coords, y, X, kernel='gaussian', family = Poisson()).search(criterion='AICc')
Poisson
bw = Sel_BW(coords, y, X, kernel='gaussian', family = Poisson()).search(criterion='AICc')
Sorry, something went wrong.
family
No branches or pull requests
I used the following codes to do the bandwidth selection for GWR Poisson but got an error saying "local variable 'aicc' referenced before assignment"
import libpysal as ps
from mgwr.sel_bw import Sel_BW
import numpy as np
from spglm.family import Poisson
data = ps.io.open(ps.examples.get_path('GData_utm.csv'))
coords = list(zip(data.by_col('X'), data.by_col('Y')))
y = np.array(data.by_col('PctBach')).reshape((-1,1))
rural = np.array(data.by_col('PctRural')).reshape((-1,1))
pov = np.array(data.by_col('PctPov')).reshape((-1,1))
african_amer = np.array(data.by_col('PctBlack')).reshape((-1,1))
X = np.hstack([rural, pov, african_amer])
bw = Sel_BW(coords, y, X, kernel='gaussian', family = Poisson).search(criterion='AICc')
The text was updated successfully, but these errors were encountered: