mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Back to the original modified Z-score treshold (5)
This commit is contained in:
parent
c461b2e549
commit
571ed087e3
@ -42,6 +42,12 @@ static qreal MAD(QVector<qreal> &v, qreal m)
|
|||||||
return median(v);
|
return median(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Modified Z-score (Iglewicz and Hoaglin)
|
||||||
|
The acceleration data distribution has usualy a (much) higher kurtosis than
|
||||||
|
the normal distribution thus a higher comparsion value than the usual 3.5 is
|
||||||
|
required.
|
||||||
|
*/
|
||||||
static QSet<int> eliminate(const QVector<qreal> &v)
|
static QSet<int> eliminate(const QVector<qreal> &v)
|
||||||
{
|
{
|
||||||
QSet<int> rm;
|
QSet<int> rm;
|
||||||
@ -51,7 +57,7 @@ static QSet<int> eliminate(const QVector<qreal> &v)
|
|||||||
qreal M = MAD(w, m);
|
qreal M = MAD(w, m);
|
||||||
|
|
||||||
for (int i = 0; i < v.size(); i++)
|
for (int i = 0; i < v.size(); i++)
|
||||||
if (qAbs((0.6745 * (v.at(i) - m)) / M) > 3.5)
|
if (qAbs((0.6745 * (v.at(i) - m)) / M) > 5.0)
|
||||||
rm.insert(i);
|
rm.insert(i);
|
||||||
|
|
||||||
return rm;
|
return rm;
|
||||||
|
Loading…
Reference in New Issue
Block a user