0
$\begingroup$

I cannot define proper equations to return onset time and the relative difference between a valley and the next peak. What is the common used notation for a time series? I have been struggling with set theory and index sets.

Main challenges are to say how many significant peaks exist in a window and what in the onset time of the first significant peak.

I thought about a set S and a set T (which should be ordered and finite, i.e. starting in 1 and finishing in 10). Then, I would store peaks in P and valleys in V and the time indices in TP and TV, respectively, as follows:

𝑇=π‘‘π‘–π‘šπ‘’

𝑆=π‘ π‘–π‘”π‘›π‘Žπ‘™

𝐼=𝐼𝑛𝑑𝑒π‘₯ 𝑠𝑒𝑑 π‘œπ‘“ 𝑆 π‘Žπ‘›π‘‘ 𝑇

𝑃=π‘π‘’π‘Žπ‘˜π‘ ={ 𝑆𝑖 ∈ 𝑆 | (𝑆𝑖 > π‘†π‘–βˆ’1) β‹€ (𝑆𝑖 β‰₯ 𝑆𝑖+1) }

𝑉=π‘£π‘Žπ‘™π‘™π‘’π‘¦π‘ ={ 𝑆𝑖 ∈ 𝑆 | (𝑆𝑖 ≀ π‘†π‘–βˆ’1) β‹€ (𝑆𝑖 < 𝑆𝑖+1) }

𝑇𝑃=π‘‘π‘–π‘šπ‘’ π‘œπ‘“ π‘π‘’π‘Žπ‘˜π‘ = { 𝑇𝑖 ∈ π‘‡βˆΆ βˆƒ 𝑆𝑖 ∈ 𝑆 | (𝑆𝑖 > π‘†π‘–βˆ’1) β‹€ (𝑆𝑖 β‰₯ 𝑆𝑖+1) }

𝑇𝑉=π‘‘π‘–π‘šπ‘’ π‘œπ‘“ π‘£π‘Žπ‘™π‘™π‘’π‘¦π‘ = { 𝑇𝑖 ∈ π‘‡βˆΆ βˆƒ 𝑆𝑖 ∈ 𝑆 | (𝑆𝑖 ≀ π‘†π‘–βˆ’1) β‹€ (𝑆𝑖 < 𝑆𝑖+1) }

𝐽=𝑖𝑛𝑑𝑒π‘₯ 𝑠𝑒𝑑 π‘œπ‘“ 𝑉 π‘Žπ‘›π‘‘ 𝑇𝑉

𝐾=𝑖𝑛𝑑𝑒π‘₯ 𝑠𝑒𝑑 π‘œπ‘“ 𝑃 π‘Žπ‘›π‘‘ 𝑇𝑃

Then, I would look for pairs of valleys and peaks with a difference greater than a threshold, for peaks that are preceded by a valley, as follows:

𝑅={π‘₯ ∈ R* | {π‘ƒπ‘˜βˆ’π‘‰π‘—, 𝑖𝑓 𝑗 ∈ 𝐽 ∢ 𝑗=π‘šπ‘Žπ‘₯(𝐽<π‘˜) β‹€ π‘ƒπ‘˜βˆ’π‘‰π‘— β‰₯ π‘‘β„Žπ‘‘

          βˆ…,    𝑖𝑓 βˆ„ 𝑇𝑉𝑗 ∈ 𝑇𝑉 ∢ 𝑇𝑉𝑗 < π‘‡π‘ƒπ‘˜

          βˆ…,    𝑖𝑓 βˆ„ π‘‡π‘ƒπ‘˜ ∈ 𝑇𝑃 ∢ 𝑇𝑉𝑗 < π‘‡π‘ƒπ‘˜

}.

𝑇𝑅={π‘‡π‘‰π‘˜ ∈ R* | {π‘‡π‘‰π‘˜, 𝑖𝑓 π‘ƒπ‘˜βˆ’π‘‰π‘— β‰₯ π‘‘β„Žπ‘‘

             βˆ…,      𝑖𝑓 βˆ„ 𝑇𝑉𝑗 ∈ 𝑇𝑉 ∢ 𝑇𝑉𝑗 < π‘‡π‘ƒπ‘˜

             βˆ…,      𝑖𝑓 βˆ„ π‘‡π‘ƒπ‘˜ ∈ 𝑇𝑃 ∢ 𝑇𝑉𝑗 < π‘‡π‘ƒπ‘˜

}.

Note: 𝑗=π‘šπ‘Žπ‘₯(𝐽<π‘˜) should stands for the maximum 𝑗 ∈ 𝐽 which is still lower than k. This way we consider only the closest valley just prior to the peak, but I guess the notation is wrong.

Then I can count the significant responses as the cardinality of R. And the onset of the first significant response would be the first element of the finite ordered set TR.

Are the notations right? I'm not sure about that.

$\endgroup$
3
  • $\begingroup$ this is quite literally unreadable $\endgroup$ May 10, 2017 at 15:12
  • $\begingroup$ Sorry, that's my first time here and I'm not used with the functionalities of this editor.... $\endgroup$ May 10, 2017 at 15:58
  • $\begingroup$ It's okay! Just take some time to make it readable $\endgroup$ May 10, 2017 at 16:10

0

You must log in to answer this question.

Browse other questions tagged .