# How do I save (and later load) fitted KernelPCA model using MultivariateStats.jl

**URL:** <https://discourse.julialang.org/t/how-do-i-save-and-later-load-fitted-kernelpca-model-using-multivariatestats-jl/58833>\
**Category:** General Usage\
**Created:** [April 8, 2021, 1:52pm UTC](https://discourse.julialang.org/t/how-do-i-save-and-later-load-fitted-kernelpca-model-using-multivariatestats-jl/58833 "2021-04-08T13:52:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Soundy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patrick_soundy/32/23766_2.png) [@Patrick\_Soundy](https://discourse.julialang.org/u/Patrick_Soundy)\
**Post date:** [April 8, 2021, 1:52pm UTC](https://discourse.julialang.org/t/how-do-i-save-and-later-load-fitted-kernelpca-model-using-multivariatestats-jl/58833/1 "2021-04-08T13:52:54Z")

</div>

I’m fitting a simple KPCA to data:

‘’‘KPCAModel = fit(KernelPCA, MyArray; kernel=(x,y)-\>exp(-norm(x-y)^2/(2\*σ^2)), maxoutdim=NumFactors, inverse=true)’‘’

How do I save the model in Julia to load it back to transform new data using that fitted? I want to be able to apply the transform to new data in a few days time rather than having to run the fit again.

Any help or suggestions would be appreciated.

Thanks.
