[Homer-users] Question on hmrMotionCorrectWavelet.

Takayuki Nozawa nozawa at idac.tohoku.ac.jp
Mon Mar 23 19:43:24 EDT 2015
Search archives:

Hi Sabrina,

Thanks for your reply.
So the equation is at least qualitatively consistent with your experience.
Good to know.

Best,
Taka


2015-03-24 1:07 GMT+09:00 Sabrina Brigadoi <sabrina.brigadoi at gmail.com>:
> Hi Taka,
>
> from my experience I can say that using IQR = 1.5 will put to 0 less
> coefficients than when using Molavi's method with alpha = 0.1, and hence
> IQR=1.5 is more conservative. Bear in mind that alpha and IQR have an
> opposite relation, when alpha -> 0, no coefficients are set to 0, while when
> IQR -> 0 more coefficients are set to 0.
>
> Best,
> Sabrina
>
> 2015-03-22 13:34 GMT+00:00 Takayuki Nozawa <nozawa at idac.tohoku.ac.jp>:
>>
>> Dear Sabrina,
>>
>> Thank you very much for the detailed reply, and also thank you for the
>> useful functions.
>>
>> Yes, I understand that for the thresholding of coefficients,
>> the method in Molavi2012 is based on the assumption of Gaussian
>> distribution
>> and the estimation of its SD,
>> while your method is more directly based on the quantiles of
>> coefficient distribution.
>> In my earlier message, by "basically" I meant "if the assumption of
>> Gaussian distribution holds".
>>
>> > I am not sure about the relation between Molavi's alpha and iqr used in
>> > Homer2, but looking at the maths it seems that the interquartile range
>> > of a
>> > normal distribution is defined as: 2 Φ−1(0.75)σ  where  Φ−1 is the
>> > quantile
>> > function and in Homer2 therefore, I think that the threshold can be
>> > defined
>> > as Φ−1(0.75) + IQR*2 Φ−1(0.75)σ where IQR is the user set variable for
>> > the
>> > upper threshold and Φ−1(0.25) - IQR*2 Φ−1(0.75)σ  for the lower
>> > threshold.
>>
>> Thank you for clarifying this out!
>> Following your explanation, I rechecked the WaveletAnalysis.m (lines
>> 52-55)
>> and found my mistake.
>> >From the help comment, I was initially assuming that the below-threshold
>> range
>> would be "iqr times the interquartile range", or equivalently in terms
>> of the code
>> the lower and upper thresholds would be set as
>> "prob2= quants(1)*iqr" and "prob1=quants(3)*iqr",
>> respectively.
>> (And sorry, even so the correspondence between params should have been
>> 2 * (1 - pnorm(qnorm(0.75)*iqr)) = alpha,
>> where qnorm = Φ^−1 = pnorm^-1. )
>>
>> Now having the correct definition of thresholding with iqr, I deduce
>> the correspondence would be
>> 2 * (1 - pnorm(qnorm(0.75)*(1+2*iqr))) = alpha.
>> If this is correct, then alpha=0.1 corresponds to iqr ~ 0.7.
>> Does this agree with your experience?
>> is this what you meant by
>> > Using IQR = 1.5 is usually more conservative than using
>> > the alpha=0.1 by Molavi.
>>
>> Thanks again for your kind help!
>>
>> Best,
>> Taka
>>
>>
>> 2015-03-21 7:55 GMT+09:00 Sabrina Brigadoi <sabrina.brigadoi at gmail.com>:
>> > Dear Taka,
>> >
>> > the wavelet motion correction algorithm implemented in Homer2 is not
>> > exactly
>> > the method explained in Molavi and Dumont's paper. It is inspired by
>> > that
>> > work and most of the code is very similar, though using a different
>> > wavelet
>> > toolbox. The main difference is the threshold used. Molavi uses alpha, a
>> > probability threshold for the coefficient distribution. The IQR metric
>> > used
>> > in Homer2 is instead related to the interquartile range of the wavelet
>> > coefficients distribution. All coefficients above Q3 + IQR times the
>> > interquartile range (iqr) or below Q1 - IQR times the interquartile
>> > range
>> > (iqr) are set to 0 and considered outliers of the distribution. Usually,
>> > for
>> > outlier detection, IQR = 1.5. But for the nirs data, IQR can be a tuning
>> > parameter, and can be set by the user depending on the amount of noise
>> > present in the data. Using IQR = 1.5 is usually more conservative than
>> > using
>> > the alpha=0.1 by Molavi. Reducing IQR, more coefficients are set to 0
>> > and
>> > more noise is removed. IQR should be set by the user depending on the
>> > data,
>> > it cannot be fixed.
>> >
>> > I am not sure about the relation between Molavi's alpha and iqr used in
>> > Homer2, but looking at the maths it seems that the interquartile range
>> > of a
>> > normal distribution is defined as: 2 Φ−1(0.75)σ  where  Φ−1 is the
>> > quantile
>> > function and in Homer2 therefore, I think that the threshold can be
>> > defined
>> > as Φ−1(0.75) + IQR*2 Φ−1(0.75)σ where IQR is the user set variable for
>> > the
>> > upper threshold and Φ−1(0.25) - IQR*2 Φ−1(0.75)σ  for the lower
>> > threshold.
>> >
>> > I hope this is useful and makes sense.
>> >
>> > Sabrina
>> >
>> > --
>> > Sabrina Brigadoi, PhD
>> > Research Associate
>> > Biomedical Optics Research Laboratory
>> > Malet Place Engineering Building, Rm 3.18
>> > University College London
>> > Gower Street
>> > London WC1E 6BT
>> >
>> >
>> > 2015-03-20 10:39 GMT+00:00 Takayuki Nozawa <nozawa at idac.tohoku.ac.jp>:
>> >>
>> >> Dear Homer2 experts,
>> >>
>> >> Thank you for sharing the great toolbox.
>> >> I have a question about the Wavelet motion correction function,
>> >> hmrMotionCorrectWavelet.m and WaveletAnalysis.m.
>> >>
>> >> Comparing the code with the original paper
>> >> Molavi et al.,Physiol Meas, 33, 259-270 (2012),
>> >> I deduced that the interquartile multi factor iqr would basically
>> >> correspond to the outlier threshold alpha in Molavi2012 by
>> >> 2 * (1 - pnorm(0.75*iqr)) = alpha,
>> >> with pnorm(q) being the normal cumulative distribution function.
>> >> Am i correct on this?
>> >>
>> >> Confirmation or correction would be much appreciated!
>> >>
>> >> Best,
>> >> Taka
>> >>
>> >> --
>> >> Takayuki Nozawa
>> >> Assistant Professor, Smart Ageing International Research Center
>> >> Institute of Development, Aging and Cancer (IDAC), Tohoku University
>> >> nozawa at idac.tohoku.ac.jp
>> >> _______________________________________________
>> >> Homer-users mailing list
>> >> Homer-users at nmr.mgh.harvard.edu
>> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>> >>
>> >>
>> >> The information in this e-mail is intended only for the person to whom
>> >> it
>> >> is
>> >> addressed. If you believe this e-mail was sent to you in error and the
>> >> e-mail
>> >> contains patient information, please contact the Partners Compliance
>> >> HelpLine at
>> >> http://www.partners.org/complianceline . If the e-mail was sent to you
>> >> in
>> >> error
>> >> but does not contain patient information, please contact the sender and
>> >> properly
>> >> dispose of the e-mail.
>> >>
>> >
>> >
>> >
>> > _______________________________________________
>> > Homer-users mailing list
>> > Homer-users at nmr.mgh.harvard.edu
>> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>> >
>> >
>> > The information in this e-mail is intended only for the person to whom
>> > it is
>> > addressed. If you believe this e-mail was sent to you in error and the
>> > e-mail
>> > contains patient information, please contact the Partners Compliance
>> > HelpLine at
>> > http://www.partners.org/complianceline . If the e-mail was sent to you
>> > in
>> > error
>> > but does not contain patient information, please contact the sender and
>> > properly
>> > dispose of the e-mail.
>> >
>>
>>
>>
>> --
>> Takayuki Nozawa
>> Assistant Professor, Smart Ageing International Research Center
>> Institute of Development, Aging and Cancer (IDAC), Tohoku University
>> nozawa at idac.tohoku.ac.jp
>>
>> _______________________________________________
>> Homer-users mailing list
>> Homer-users at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
>
>
> --
> Sabrina Brigadoi
> sabrina.brigadoi at gmail.com
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>



-- 
Takayuki Nozawa
Assistant Professor, Smart Ageing International Research Center
Institute of Development, Aging and Cancer (IDAC), Tohoku University
nozawa at idac.tohoku.ac.jp




More information about the Homer-users mailing list