You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data set Y could be, for example, a time series of stock prices. The P = PeakTree(Y) object is a tree structure that describes features of Y.
Position-based vs label-based indexing is an issue in three cases:
Y has an integer index, but it also has labels, for example time stamps.
P has internal data as dicts, and each dict has both keys and integer positions (available as P._index).
Peaks are located by starts and stops that can be either integers (as in slices of Y) or labels (pairs of time stamps).
In previous versions
The idea was that all indexing should be label-based, since integer positions would be tied to the Y array and not be robust to resampling of the data.
Starts and stops should not be necessary to compute, but possible.
P's dict keys was argmin labels, which approximately located the peaks.
In future versions, maybe
Starts and stops are computed by default. Easier to understand than argmin positions.
Integer slice notation will be used to locate peaks, by default. Much more lightweight than pairs of time stamps. But requires Y for reference.
P dict keys can be changed freely
Label-based indexing of Y should not be expected, but possible
The text was updated successfully, but these errors were encountered:
There is a somewhat similar issue in pandas development.
Quote: "We propose that it should only work with positional indexing, and the translation of keys to positions should be entirely done at a higher level."
The data set Y could be, for example, a time series of stock prices. The P = PeakTree(Y) object is a tree structure that describes features of Y.
Position-based vs label-based indexing is an issue in three cases:
P._index
).In previous versions
In future versions, maybe
The text was updated successfully, but these errors were encountered: