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
The G_Local statistic currently assumes that all weights are equal in its __crand() method. This could be in the case where input weights are binary, or in the case where input weights are row standardized, but that row standardization has to be of equally-weighted input. This isn't valid when input weights are row-standardized, but not constant (like, in perimeter-weighted contiguity or any kernel weighting). While the vast majority of users use binary G_Local, this would be good to fix.
So, to simplify the calc method and correct this in the __crand implementation, @sjsrey and I have drawn up a roadmap of the desired new behavior:
change the star=False arg to star=None
use the w however it is provided if star=None. This means that, by default, the statistic will:
detect if there is a diagonal value in w.sparse
if so, treat it as Gi* and otherwise compute Gi.
if star=False, the input w will have its diagonal zeroed. If transform='R', then the weights will be re-transformed after over-writing the diagonal.
if star=True, then we need some more information:
ifw has a diagonal, use it.
if w has no diagonal, then examine the inputted weight's transform:
if the weights are binary, add one to diagonal
otherwise, warn that the statistic is going to be the gi, not gi-star and give directions on how to update the w with a self-weight for gi-star.
if star is a float, use that as self weight if the w doesn't have it
The text was updated successfully, but these errors were encountered:
The
G_Local
statistic currently assumes that all weights are equal in its__crand()
method. This could be in the case where input weights are binary, or in the case where input weights are row standardized, but that row standardization has to be of equally-weighted input. This isn't valid when input weights are row-standardized, but not constant (like, in perimeter-weighted contiguity or any kernel weighting). While the vast majority of users use binaryG_Local
, this would be good to fix.So, to simplify the
calc
method and correct this in the__crand
implementation, @sjsrey and I have drawn up a roadmap of the desired new behavior:star=False
arg tostar=None
w
however it is provided ifstar=None
. This means that, by default, the statistic will:w.sparse
Gi*
and otherwise computeGi
.star=False
, the inputw
will have its diagonal zeroed. Iftransform='R'
, then the weights will be re-transformed after over-writing the diagonal.star=True
, then we need some more information:w
has a diagonal, use it.w
has no diagonal, then examine the inputted weight's transform:The text was updated successfully, but these errors were encountered: