Skip to content

[ENH] Support geographically weighted decomposition (starting with GWPCA) #79

@aman-coder03

Description

@aman-coder03

I have been exploring the existing geographically weighted estimators in gwlearn and was wondering whether it would make sense to extend the framework to unsupervised models, starting with Geographically Weighted PCA (GWPCA).

The idea would be to introduce a small base abstraction (e.g., BaseGWDecomposition) that reuses the current neighborhood and spatial weighting logic, but operates directly on X instead of (X, y). Since sklearn.decomposition.PCA does not support sample_weight, this would likely require computing a weighted covariance matrix (or weighted SVD) for each focal observation.

The goal would be to keep the API consistent with scikit-learn conventions (e.g., components_, explained_variance_) and compatible with libpysal.graph.Graph, similar to the current GW estimators.

If this aligns with the direction of gwlearn, I would be happy to draft an initial implementation for discussion.

Would appreciate your thoughts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions