Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PCA decomposition and convolution? #98

Open
lukegre opened this issue Aug 3, 2020 · 3 comments
Open

Add PCA decomposition and convolution? #98

lukegre opened this issue Aug 3, 2020 · 3 comments
Assignees

Comments

@lukegre
Copy link
Contributor

lukegre commented Aug 3, 2020

Not really an issue, but I've developed similar tools: https://github.com/luke-gregor/OceanDataTools. The repo is a mess - feel free to dig around.

There's some overlap with esmtools - linear regression, detrending, but I've also developed the two tools that might be useful:

  • pca_decomp: Principle component analysis decomposition for time/lat/lon data
  • convolve: a 2D convolution (moving average) on lat, lon. Leverages on astropy.
@bradyrx
Copy link
Owner

bradyrx commented Aug 3, 2020

@luke-gregor, I hadn't added any PCA functions since the eofs package really handles it (https://github.com/ajdawson/eofs). It's pretty straight-forward. Here's me using it for the NPGO index: https://github.com/bradyrx/public_code/blob/master/NPGO_Index.py.

However, your implementation looks really clean and convenient, so I think it'd still be a useful addition. Of course the convolve function as well. Would love to have you port those over if you're interested in merging with here. I'm fine with additional dependencies. Otherwise I can keep your package in mind for those things. Let me know.

@lukegre
Copy link
Contributor Author

lukegre commented Aug 5, 2020

@bradyrx re EOF/PCA I think it makes sense to build on what is around. Wasn't aware of the eofs 👍 a very useful tool to have.

And for convolve, could make this so that it is not an explicit requirement (doesn't fail when importing esmtools) but throws an error when the function is called and astropy is not installed.

@bradyrx
Copy link
Owner

bradyrx commented Sep 9, 2020

Sorry @luke-gregor , just getting better about Github notifications now. Been a crazy time for us all. Feel free to open a PR to implement this if you'd like! No rush, but I'll be happy to review if you decide to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants