-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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