[SciPy-user] fill a timeseries with masked data by correlation from another series
Thu Apr 3 19:10:00 CDT 2008
> Mmh, that'll depend on what you want to do. More specific questions would be
> better answered...
That was meant as a introduction to the questions that followed ;-)
>> I would like to correlate two (or more timeseries) to estimate invalid and
>> masked values in one series based on the values of another complete series
>> using the correlation coefficient.
>> How can I to that?
>> I tried this without successs:
>> ### CODE ###
>> In : scipy.stats.corrcoef(series,modseries)
> scipy.stats.corrcoef doesn't accept masked arrays. More exactly, it transforms
> a masked array into a regular ndarray, therefore losing the mask. Most of the
> functions of scipy.stats work that way. I'm currently rewriting (most of)
> them to support masked array,
> hopefully I'll be able to post something in the
> next few days. Where should I post them ? In scipy.stats.mstats ? In
> numpy.ma ?
I don't know because I am not a developer. But I would use scipy.stats.mstats.
>> Furthermore I like to calculate other tests like t-test, chi-test,
>> Kolmogorov-Smirnof on the two sets and get distribution parameters (RMSE,
>> MBE, STD) for each series.
>> How can this be done?
Actually, I was able to compute Kolmogorov-Smirnof (KSI). But correlation wasn't
> For the basic statistical tests in scipy.stats, see above.
> For STD, you can use the std method
> For RMSE, you could try to sum the squares of the anomalies
> For MBE, you're losing me: Member of the British Empire
Some publications call it Mean Bias Error, I think it's the same as
Thanks a lot for your efforts!
More information about the SciPy-user