Python3 warnings
This commit is contained in:
parent
550e514726
commit
32b2068648
@ -177,7 +177,6 @@ class GWR(GLM):
|
|||||||
W = ak[kernel](coords, bw, points)
|
W = ak[kernel](coords, bw, points)
|
||||||
except:
|
except:
|
||||||
raise TypeError('Unsupported kernel function ', kernel)
|
raise TypeError('Unsupported kernel function ', kernel)
|
||||||
|
|
||||||
return W
|
return W
|
||||||
|
|
||||||
def fit(self, ini_params=None, tol=1.0e-5, max_iter=20, solve='iwls'):
|
def fit(self, ini_params=None, tol=1.0e-5, max_iter=20, solve='iwls'):
|
||||||
@ -218,8 +217,7 @@ class GWR(GLM):
|
|||||||
p = np.zeros((m, 1))
|
p = np.zeros((m, 1))
|
||||||
for i in range(m):
|
for i in range(m):
|
||||||
wi = self.W[i].reshape((-1,1))
|
wi = self.W[i].reshape((-1,1))
|
||||||
rslt = iwls(self.y, self.X, self.family, self.offset,
|
rslt = iwls(self.y, self.X, self.family, self.offset, ini_params, tol, max_iter, wi=wi)
|
||||||
ini_params, tol, max_iter, wi=wi)
|
|
||||||
params[i,:] = rslt[0].T
|
params[i,:] = rslt[0].T
|
||||||
predy[i] = rslt[1][i]
|
predy[i] = rslt[1][i]
|
||||||
v[i] = rslt[2][i]
|
v[i] = rslt[2][i]
|
||||||
|
Loading…
Reference in New Issue
Block a user