-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def runavg(ts, w): #4
Comments
Isn't this what |
This may actually be a problematic difference when missing values are present. I'm going to investigate this on Friday and report back. |
What exactly are you referring to here? About how it is implemented in python or R? |
I have discovered that as more data are missing in a time series, the two languages begin calculating the 90th percentile thresholds differently. At 10% missing data these differences become large enough to begin affecting the number of events detected. I went over the R code in minute detail to track down where this happens, and next need to go through the python code. I think there are a couple of places where the languages may be handling missing values differently when calculating percentiles. But it looks like this is the most. |
The percentile function is written in C++... I hope it is not there.
That'll be a pain to fix. Maybe in one of the tests substitute the C++ bit
that I wrote with an R equivalent and see what happens.
— A/Prof. AJ Smit | Department of Biodiversity & Conservation Biology
| University
of the Western Cape | Private Bag X17 | Bellville 7535 | South Africa
Work tel.: +27 21 959 3783 <//+27 21 959 3783> | Fax.: +27 21 959 2312
<//+27 21 959 2312> | Mobile: +27 78 300 6005 <//+27 78 300 6005>
GitHub:
https://github.com/ajsmit
R packages:
https://github.com/ajsmit/RmarineHeatWaves
https://robwschlegel.github.io/heatwaveR
From: William Schlegel Robert <notifications@github.com>
<notifications@github.com>
Reply: robwschlegel/heatwaveR
<reply@reply.github.com>
<reply@reply.github.com>
Date: 24 January 2019 at 15:21:01
To: robwschlegel/heatwaveR <heatwaver@noreply.github.com>
<heatwaver@noreply.github.com>
Cc: Smit AJ <albertus.smit@gmail.com> <albertus.smit@gmail.com>, Comment
<comment@noreply.github.com> <comment@noreply.github.com>
Subject: Re: [robwschlegel/heatwaveR] def runavg(ts, w): (#4)
I have discovered that as more data are missing in a time series, the two
languages begin calculating the 90th percentile thresholds differently. At
10% missing data these differences become large enough to begin affecting
the number of events detected. I went over the R code in minute detail to
track down where this happens, and next need to go through the python code.
I think there are a couple of places where the languages may be handling
missing values differently when calculating percentiles. But it looks like
this is the most.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABaZAaueG4WuYu1EHibFaoODFbAnGwhRks5vGbM8gaJpZM4UQ9Iv>
.
|
We have the old quantile function |
You said "language or the other may still count missing data in the overall
n of data before finding means"... I don't think this is possible in R or
C++ as the mean functions there do not work when NAs are present. It
shouldn't work anywhere for that matter.
Maybe it is that moving window function, which was quite tricky to
implement. It is not the traditional moving window function, because it
runs along a block of data (n doys x m years), and if missing values are in
there it might be handled differently in python and R.
— A/Prof. AJ Smit | Department of Biodiversity & Conservation Biology
| University
of the Western Cape | Private Bag X17 | Bellville 7535 | South Africa
Work tel.: +27 21 959 3783 <//+27 21 959 3783> | Fax.: +27 21 959 2312
<//+27 21 959 2312> | Mobile: +27 78 300 6005 <//+27 78 300 6005>
GitHub:
https://github.com/ajsmit
R packages:
https://github.com/ajsmit/RmarineHeatWaves
https://robwschlegel.github.io/heatwaveR
From: William Schlegel Robert <notifications@github.com>
<notifications@github.com>
Reply: robwschlegel/heatwaveR
<reply@reply.github.com>
<reply@reply.github.com>
Date: 24 January 2019 at 17:29:43
To: robwschlegel/heatwaveR <heatwaver@noreply.github.com>
<heatwaver@noreply.github.com>
Cc: Smit AJ <albertus.smit@gmail.com> <albertus.smit@gmail.com>, Comment
<comment@noreply.github.com> <comment@noreply.github.com>
Subject: Re: [robwschlegel/heatwaveR] def runavg(ts, w): (#4)
language or the other may still count missing data in the overall n of data
before finding means
|
We have the old quantile function |
'''
The text was updated successfully, but these errors were encountered: