comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » covariance matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
covariance matrix [message #91809] Sun, 30 August 2015 14:30 Go to next message
siumtesfai is currently offline  siumtesfai
Messages: 62
Registered: April 2013
Member
Hello all

I have filled my missing value with NAN

data = Array[4176, 168]

ntime= 168

I am interested in calculating covariance matrix

matrix = (1/ntime-1) * (Double(data) ## Transpose(data))


I found this result



result = Array[168, 168]
Min = NaN
Max = NaN


Any help would be appreciate on how to do the covariance matrix on the good data with exclusion of missing data

Best regards
Re: covariance matrix [message #91811 is a reply to message #91809] Sun, 30 August 2015 16:46 Go to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Sunday, August 30, 2015 at 3:30:41 PM UTC-6, siumt...@gmail.com wrote:
> Hello all
>
> I have filled my missing value with NAN
>
> data = Array[4176, 168]
>
> ntime= 168
>
> I am interested in calculating covariance matrix
>
> matrix = (1/ntime-1) * (Double(data) ## Transpose(data))
>
>
> I found this result
>
>
>
> result = Array[168, 168]
> Min = NaN
> Max = NaN
>
>
> Any help would be appreciate on how to do the covariance matrix on the good data with exclusion of missing data
>
> Best regards

Is it adequate to eliminate NaNs in your derived values rather than filter them prior to your calculation?

data = randomu(seed, 4176, 168)
data[randomu(seed, 336)*(4176*168L)] = !values.f_nan
matrix = (1/ntime - 1)*(Double(data) ## Transpose(data))
print, min(matrix)
NaN
print, min(matrix, /nan)
-1410.1838
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NG: bring_to_front doesn't always work
Next Topic: Writing programs to use static methods but still compile in IDL 7

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:14:53 PDT 2025

Total time taken to generate the page: 0.00196 seconds