Skip to content

Commit

Permalink
Correct documentation regarding possible transformations (#352)
Browse files Browse the repository at this point in the history
* Correct documentation

Setting transformation to "U" causes an "unsupported weights transformation" exception because "U" is not an accepted parameter of the set_transform method of the libpysal.weights.W class. The correct argument is "O", which is described in the libpysal.weights.W documentation as "Restore original transformation (from instantiation)". I've updated the documentation to reflect that.

* clarify when 'O' is permissible

Co-authored-by: Martin Fleischmann <[email protected]>

* clarify when 'O' is permissible

---------

Co-authored-by: Martin Fleischmann <[email protected]>
  • Loading branch information
JasonSteelmanCoder and martinfleis authored Jan 18, 2025
1 parent f5c0a56 commit f7c53db
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions esda/moran.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class Moran:
transformation : string
weights transformation, default is row-standardized "r".
Other options include "B": binary, "D":
doubly-standardized, "U": untransformed
doubly-standardized, "O": restore original transformation
(applicable only if ``w`` is passed as ``W``)
(general weights), "V": variance-stabilizing.
permutations : int
number of random permutations for calculation of
Expand Down Expand Up @@ -422,7 +423,7 @@ class Moran_BV: # noqa: N801
Other options include
"B": binary,
"D": doubly-standardized,
"U": untransformed (general weights),
"O": restore original transformation (applicable only if ``w`` is passed as ``W``),
"V": variance-stabilizing.
permutations : int
number of random permutations for calculation of pseudo
Expand Down Expand Up @@ -806,7 +807,7 @@ class Moran_Rate(Moran): # noqa: N801
Other options include
"B": binary,
"D": doubly-standardized,
"U": untransformed (general weights),
"O": restore original transformation (applicable only if ``w`` is passed as ``W``),
"V": variance-stabilizing.
two_tailed : boolean
If True (default), analytical p-values for Moran's I are
Expand Down Expand Up @@ -1042,7 +1043,7 @@ class Moran_Local: # noqa: N801
Other options include
"B": binary,
"D": doubly-standardized,
"U": untransformed (general weights),
"O": restore original transformation (applicable only if ``w`` is passed as ``W``),
"V": variance-stabilizing.
permutations : int
number of random permutations for calculation of pseudo
Expand Down Expand Up @@ -1473,7 +1474,7 @@ class Moran_Local_BV: # noqa: N801
Other options include
"B": binary,
"D": doubly-standardized,
"U": untransformed (general weights),
"O": restore original transformation (applicable only if ``w`` is passed as ``W``),
"V": variance-stabilizing.
permutations : int
number of random permutations for calculation of pseudo
Expand Down Expand Up @@ -1778,7 +1779,7 @@ class Moran_Local_Rate(Moran_Local): # noqa: N801
Other options include
"B": binary,
"D": doubly-standardized,
"U": untransformed (general weights),
"O": restore original transformation (applicable only if ``w`` is passed as ``W``),
"V": variance-stabilizing.
permutations : int
number of random permutations for calculation of pseudo
Expand Down

0 comments on commit f7c53db

Please sign in to comment.