Repository navigation
[GH-3475] Correct the GeoStats Python docstrings - #3476
Merged
Merged
Conversation
- Moran and MoranResult had no docstrings. - dbscan: include_outliers defaults to True, not False. - g_local: point to sedona.spark.stats.weighting.add_distance_band_column instead of a module that does not exist, and name the output columns EG and VG as they are added. - weighting: the new column is named by result_name, not 'cluster'; add_weighted_distance_band_column weights are dist^alpha and alpha has no default; only weighted distances can give infinite weights. Add the blank line griffe needs before Returns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes GeoStats Python docstrings are missing or wrong #3475What changes were proposed in this PR?
Docstring-only changes in
python/sedona/spark/stats:Moran,Moran.get_globalandMoranResult: new docstrings. They describe the inputget_globalneeds (an id column, a numeric value column, and a column namedweightswhose neighbors carry the id and value columns, for example fromadd_distance_band_columnwithsaved_attributes) and the three result fields.dbscan:include_outliersdefaults to True.g_local: point tosedona.spark.stats.weighting.add_distance_band_column, say thatinclude_self=Trueputs the focal observation in its neighbors for Gi*, and name the added columnsEGandVGas the Scala code does.weighting: the new column is named byresult_name('weights'by default), not'cluster'.add_weighted_distance_band_columnweights aredist^alphaandalphais required. Only weighted distances with a negative alpha give infinite weights, soadd_binary_distance_band_columnno longer mentions them.Returns:inadd_distance_band_columnandg_local, so docstring parsers such as griffe read it as a section.How was this patch tested?
DBSCAN,GetisOrd,Weighting,Moran).pre-commit runon the changed files passes, and the files compile.Did this PR include necessary documentation updates?