Hi Luca,

The other part of the decomposition that you're missing is available
in `spca.components_` and has shape `(n_components, n_features)`. The
approximation of X is therefore `np.dot(x_3_dimensional,
spca.components_)`.

Best,
Vlad

On Thu, Oct 16, 2014 at 6:07 PM, Luca Puggini <lucapug...@gmail.com> wrote:
> Hi,
> is there any way to reconstruct the data after SparsePCA?
>
> If I do
>
> spca = SparsePCA(alpha=1, n_components=3).fit(x)
> x_3_dimensional = SparsePCA.transform(x)
>
> How can I get the best lower rank approximation of x after SparsePCA
> decomposition?
>
> Thanks,
> Luca
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to