[ITK] [ITK-users] How can I calculate PCA Principal Modes means?
Viki MCG
vikimcg at gmail.com
Tue Jun 30 07:07:07 EDT 2015
First of all, thanks for the answer. Unfortunately, I don't think that
"means" stands for "...the mean from each dimension of your data...".
In the example the author creates two arrays (mean and stddev) with a
length equal to the number of Principal Components, so, when he writes
"mean.Fill(0.0)" he expects:
a) one different mean for each Principal Component (of course, it could be
the same, but he offers the chance to choose different means)
b) a double value, not an array with a value for x, y and z.
That's why I think your hint isn't right, unluckily.
Anyway, I really appreciate the time you spent on solving my question,
Viki.
2015-06-30 11:13 GMT+02:00 Timothee Evain <tevain at telecom-paristech.fr>:
> Hello Viki,
>
> I'm not a specialist but it seems to me that this is the empirical mean of
> your data.
> Usually when you are doing a PCA, you are normalizing by subtracting the
> mean and dividing the variance to avoid bias from huge scale data.
>
> So basically I would say you have to compute the mean from each dimension
> of your data.
> Stating that you are working with 3D :
> [ Point1_X Point1_Y Point1_Z
> : : :
> PointN_X PointN_Y PointN_Z ]
>
> MeanX = (Sum[n=1...N] (Pointn_X)) / N
> Idem for other.
>
> Hope this help,
>
> Tim
>
> ----- Mail original -----
> De: "Viki MCG" <vikimcg at gmail.com>
> À: insight-users at itk.org
> Envoyé: Lundi 29 Juin 2015 21:54:44
> Objet: [ITK] [ITK-users] How can I calculate PCA Principal Modes means?
>
> I'm using itk::GeodesicActiveContourShapePriorLevelSetImageFilter. I read
> the example given in (
>
> http://www.itk.org/Doxygen/html/Examples_2Segmentation_2GeodesicActiveContourShapePriorLevelSetImageFilter_8cxx-example.html
> ) but I don't understand the following paragraph.
>
> // The parameters of the distribution are user-specified. Since we
> // assumed the principal modes have already been normalized,
> // we set the distribution to zero mean and unit variance.
> CostFunctionType::ArrayType mean( shape->GetNumberOfShapeParameters() );
> CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() );
> mean.Fill( 0.0 );
> stddev.Fill( 1.0 );
> costFunction->SetShapeParameterMeans( mean );
> costFunction->SetShapeParameterStandardDeviations( stddev );
>
> Supposing that I have NOT normalized the principal modes, how can I
> calculate their means? I got principal modes using
> itk::ImagePCAShapeModelEstimator and I know their standard deviations are
> sqrt(eigen values), but I don't see how can I know their means.
>
> Any help would be very appreciated.
>
> Thanks in advance,
>
> Viki.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150630/7d4649e2/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list