mvtsa.representation.triangular_episodes#
- mvtsa.representation.triangular_episodes(x, sigma=None, eps1=None, eps2=None, min_duration=None)[source]#
Episode sequence of a univariate signal.
- Parameters:
- x
array(T,)or(T, 1) - sigma
float,optional Standard deviation of the Gaussian filter (0: no smoothing; default
T/60). Larger values remove small features and shorten the episode sequence (Balaskó et al. used 20 for 480 samples).- eps1, eps2
float,optional Dead zones of the first and second derivative (default: 5 % and 10 % of the standard deviation of the respective derivative).
- min_duration
int,optional Episodes shorter than this (default
max(3, T/100)) are merged into the neighbour with the same direction (or the longer neighbour).
- x
Examples
>>> t = np.linspace(0.5, 2 * np.pi - 0.5, 200) >>> episode_string(triangular_episodes(np.sin(t), sigma=0)) 'ABFCD'