pyhctsa.operations.physics.walker

pyhctsa.operations.physics.walker(y, walker_rule='prop', walker_params=None)

Simulates a hypothetical walker moving through the time domain.

The hypothetical particle (or ‘walker’) moves in response to values of the time series at each point. Outputs from this operation are summaries of the walker’s motion, and comparisons of it to the original time series.

Parameters:
y : array-like

The input time series.

walker_rule : str, optional

The kinematic rule by which the walker moves in response to the time series over time:

  • ’prop’: the walker narrows the gap between its value and that of the time series by a given proportion p. walker_params = p

  • ’biasprop’: the walker is biased to move more in one direction; when it is being pushed up by the time series, it narrows the gap by a proportion p_up, and when it is being pushed down by the time series, it narrows the gap by a (potentially different) proportion p_down. walker_params = [pup, pdown]

  • ’momentum’: the walker moves as if it has mass m and inertia from the previous time step and the time series acts as a force altering its motion in a classical Newtonian dynamics framework. walker_params = m (the mass).

  • ’runningvar’: the walker moves with inertia as above, but

    its values are also adjusted so as to match the local variance of time series by a multiplicative factor. walkerParams = [m, wl], where m is the inertial mass and wl is the window length.

walker_params : float, int, or list, optional

The parameters for the specified walker_rule, explained above.

Returns:

Include the mean, spread, maximum, minimum, and autocorrelation of the walker’s trajectory, the number of crossings between the walker and the original time series, the ratio or difference of some basic summary statistics between the original time series and the walker, an Ansari-Bradley test comparing the distributions of the walker and original time series, and various statistics summarizing properties of the residuals between the walker’s trajectory and the original time series.

Return type:

dict