erdogant / pca

pca: A Python Package for Principal Component Analysis.
https://erdogant.github.io/pca
MIT License
286 stars 43 forks source link

Fit_transform but no transform() #11

Closed M-Harrington closed 3 years ago

M-Harrington commented 3 years ago

Hi, maybe I've missed it, but could you add a transform method to supplement fit_transform? Ideally I'd like to call this on new data after it's already been fit and return PCs without refitting.

erdogant commented 3 years ago

The fitted model is stored in results and with the model it is possible to do the transformation step. However, I agree that it may be a bit inconvenient. So I created a transform function!

pip install -U distfit
import distfit
print(distfit.__version__)

The version should be >= 1.4.0

An example can be found in the readme!

M-Harrington commented 3 years ago

Thank you for the resource, and thank you for authoring the package! It’s great and has a lot more useful functionality than the sole arm package!

Cheers

On Fri, Mar 26, 2021 at 11:48 AM Erdogan Taskesen @.***> wrote:

The fitted model is stored in results and with the model it is possible to do the transformation step. However, I agree that it may be a bit inconvenient. So I created a transform function!

pip install -U distfit import distfit print(distfit.version)

The version should be >= 1.4.0

An example can be found in the readme!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erdogant/pca/issues/11#issuecomment-808324108, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBK4726RGJEZANVQ37CL5DTFSUFFANCNFSM4ZT7YCYA .