API Reference

Core

pyhctsa.calculator.FeatureCalculator([...])

A configuration-driven feature extraction calculator for time series data.

pyhctsa.distribute.LocalDistributor([n_workers])

Local process-based distributor using a pathos ProcessPool.

Utilities

pyhctsa.utils.get_dataset([which])

Load predefined datasets for testing and validation.

pyhctsa.utils.z_score(x)

Z-score the input data vector.

Time-Series Analysis Method Modules

Correlation

pyhctsa.operations.correlation.autocorr(y[, ...])

Compute the autocorrelation of an input time series.

pyhctsa.operations.correlation.add_noise(y)

Changes in the automutual information with the addition of noise.

pyhctsa.operations.correlation.theiler_q(y)

Computes Theiler's Q statistic which quantifies asymmetry in time.

pyhctsa.operations.correlation.crinkle_statistic(y)

Computes Theiler's crinkle statistic.

pyhctsa.operations.correlation.time_rev_kaplan(y)

Time reversal asymmetry statistic.

pyhctsa.operations.correlation.embed2_angle_tau(y, ...)

Angle autocorrelation in a 2-dimensional embedding space.

pyhctsa.operations.correlation.embed2(y[, tau])

Statistics of the time series in a 2-dimensional embedding space.

pyhctsa.operations.correlation.periodicity_wang(y)

Periodicity extraction measure of Wang et al. (2007).

pyhctsa.operations.correlation.compare_min_ami(y)

Assess the variability in the first minimum of automutual information (AMI) across binning strategies.

pyhctsa.operations.correlation.histogram_ami(y)

The automutual information of the distribution using histograms.

pyhctsa.operations.correlation.stick_angles(y)

Analysis of the line-of-sight angles between time series data pts.

pyhctsa.operations.correlation.nonlinear_autocorr(y, taus)

Compute a custom nonlinear autocorrelation of a time series.

pyhctsa.operations.correlation.partial_autocorr(y)

Compute the partial autocorrelation of an input time series.

pyhctsa.operations.correlation.embed2_dist(y)

Analyzes distances in a 2-dimensional embedding space of a time series.

pyhctsa.operations.correlation.embed2_basic(y)

Point-density statistics in a two-dimensional delay embedding.

pyhctsa.operations.correlation.embed2_shapes(y)

Shape-based statistics in a 2-d embedding space.

pyhctsa.operations.correlation.fzcglscf(y, ...)

The first zero-crossing of the generalized self-correlation function.

pyhctsa.operations.correlation.glscf(y, ...)

Compute the generalized linear self-correlation function (GLSCF) of a time series.

pyhctsa.operations.correlation.first_crossing(y)

The first crossing of a given autocorrelation function across a given threshold.

pyhctsa.operations.correlation.translate_shape(y)

Statistics on datapoints inside geometric shapes across the time series.

pyhctsa.operations.correlation.autocorr_shape(y)

How the autocorrelation function changes with the time lag.

pyhctsa.operations.correlation.trev(y[, tau])

Normalized nonlinear autocorrelation (trev) function of a time series.

pyhctsa.operations.correlation.tc3(y[, tau])

Normalized nonlinear autocorrelation function, tc3.

Criticality

pyhctsa.operations.criticality.rad(x[, tau, ...])

Compute the Rescaled Auto-Density (RAD) feature of a time series.

Distribution

pyhctsa.operations.distribution.compare_ks_fit(x, ...)

Fits a distribution to data.

pyhctsa.operations.distribution.withinp(x[, ...])

Proportion of data points within p standard deviations of the mean or median.

pyhctsa.operations.distribution.unique(y)

The proportion of the time series that are unique values.

pyhctsa.operations.distribution.spread(y[, ...])

Measure of spread of the input time series.

pyhctsa.operations.distribution.quantile(y)

Calculates the quantile value at a specified proportion, p.

pyhctsa.operations.distribution.proportion_values(x)

Calculate the proportion of values meeting specific conditions in a time series.

pyhctsa.operations.distribution.pleft(y[, th])

Distance from the mean at which a given proportion of data are more distant.

pyhctsa.operations.distribution.min_max(y[, ...])

The maximum and minimum values of the input data vector.

pyhctsa.operations.distribution.mean(y[, ...])

A given measure of location of a data vector.

pyhctsa.operations.distribution.high_low_mu(y)

The high_low_mu statistic.

pyhctsa.operations.distribution.fit_mle(y[, ...])

Maximum likelihood distribution fit to data.

pyhctsa.operations.distribution.cv(x[, k])

Calculate the coefficient of variation of order k.

pyhctsa.operations.distribution.custom_skewness(y)

Compute custom skewness measures of a time series.

pyhctsa.operations.distribution.burstiness(y)

Calculate burstiness statistics of a time series.

pyhctsa.operations.distribution.moments(y[, ...])

A moment of the distribution of the input time series.

pyhctsa.operations.distribution.outlier_include(y)

How statistics depend on distributional outliers.

pyhctsa.operations.distribution.outlier_test(y)

How distributional statistics depend on distributional outliers.

pyhctsa.operations.distribution.trimmed_mean(x)

Mean of the trimmed time series.

pyhctsa.operations.distribution.histogram_asymmetry(y)

Calculate measures of histogram asymmetry for a time series.

pyhctsa.operations.distribution.histogram_mode(y)

Measures the mode of the data vector using histograms with a given number of bins.

pyhctsa.operations.distribution.remove_points(y)

How time-series properties change as points are removed.

Entropy

pyhctsa.operations.entropy.shannon_entropy(y)

Approximate Shannon entropy of a time series.

pyhctsa.operations.entropy.distribution_entropy(y)

Distributional entropy.

pyhctsa.operations.entropy.multi_scale_entropy(y)

Compute multiscale entropy (MSE) of a time series using sample entropy across multiple scales.

pyhctsa.operations.entropy.sample_entropy(y)

Compute Sample Entropy (SampEn) of a time series.

pyhctsa.operations.entropy.permutation_entropy(y)

Permutation Entropy (PermEn) of a time series.

pyhctsa.operations.entropy.rpde(y[, m, tau, ...])

Recurrence period density entropy (RPDE).

pyhctsa.operations.entropy.approximate_entropy(x)

Approximate entropy (ApEn) of a time series.

pyhctsa.operations.entropy.complexity_invariant_distance(y)

Complexity-invariant distance

pyhctsa.operations.entropy.lempel_ziv_complexity(x)

Compute the normalized Lempel-Ziv (LZ) complexity of an n-bit encoding of a time series.

Extreme Events

pyhctsa.operations.extreme_events.moving_threshold(y)

Moving threshold model for extreme events in a time series.

Graph

pyhctsa.operations.graph.visibility_graph(y)

Visibility graph analysis of a time series.

Hypothesis Tests

pyhctsa.operations.hypothesis_tests.variance_ratio_test(y)

Variance ratio test for random walk.

pyhctsa.operations.hypothesis_tests.hypothesis_test(x)

Perform statistical hypothesis testing on a time series.

Information

pyhctsa.operations.information.first_min(y)

Time of first minimum in a given self-correlation function.

pyhctsa.operations.information.first_max(y)

Time of first maximum in a given self-correlation function.

pyhctsa.operations.information.automutual_info_stats(y)

Calculate statistics on the automutual information (AMI) function of a time series.

pyhctsa.operations.information.automutual_info(y)

Compute time-delayed automutual information of a time series.

pyhctsa.operations.information.rm_automutual_information(y)

Estimates the mutual information of two stationary signals with independent pairs of samples using various approaches.

Medical

pyhctsa.operations.medical.raw_hrv_meas(x)

Compute Poincaré plot-based HRV (Heart Rate Variability) measures from RR interval time series.

pyhctsa.operations.medical.hrv_classic(y)

Compute classic heart rate variability (HRV) statistics.

pyhctsa.operations.medical.pol_var(x[, d, D])

Compute the POLVARd measure of a time series.

pyhctsa.operations.medical.pnn(x)

Compute pNNx measures of heart rate variability (HRV).

Model Fit

pyhctsa.operations.model_fit.hmm_fit(y[, ...])

Fits a Hidden Markov Model to sequential data.

pyhctsa.operations.model_fit.fit_subsegments(y)

Robustness of model parameters across different segments of a time series.

pyhctsa.operations.model_fit.loop_local_simple(y)

How simple local forecasting depends on window length.

pyhctsa.operations.model_fit.local_simple(y)

Simple local time-series forecasting.

pyhctsa.operations.model_fit.exp_smoothing(x)

Exponential smoothing time-series prediction model.

pyhctsa.operations.model_fit.ar_cov(y[, p])

Fits an autoregressive (AR) model of a given order p.

pyhctsa.operations.model_fit.ar_fit(y[, ...])

Statistics of a fitted AR model to a time series.

Physics

pyhctsa.operations.physics.walker(y[, ...])

Simulates a hypothetical walker moving through the time domain.

pyhctsa.operations.physics.force_potential(y)

Couple a time series to a driven dynamical system.

Pre-Process

pyhctsa.operations.pre_process.preproc_compare(y)

Compare time-series properties before and after pre-processing.

Scaling

pyhctsa.operations.scaling.fast_dfa(y)

Measures the scaling exponent of the time series using a fast implementation of detrended fluctuation analysis (DFA).

pyhctsa.operations.scaling.fluctuation_analysis(x)

Implements fluctuation analysis by a variety of methods.

Spectral

pyhctsa.operations.spectral.spectral_summaries(y)

Statistics of the power spectrum of a time series.

Stationarity

pyhctsa.operations.stationarity.local_distributions(y)

Compares the distribution in consecutive time-series segments.

pyhctsa.operations.stationarity.dyn_win(y[, ...])

How stationarity estimates depend on the number of time-series subsegments.

pyhctsa.operations.stationarity.moment_corr(x)

Correlations between simple statistics in local windows of a time series.

pyhctsa.operations.stationarity.simple_stats(x)

Basic statistics about an input time series.

pyhctsa.operations.stationarity.local_extrema(y)

How local maximums and minimums vary across the time series.

pyhctsa.operations.stationarity.kpss_test(y)

Performs the KPSS (Kwiatkowski-Phillips-Schmidt-Shin) stationarity test.

pyhctsa.operations.stationarity.range_evolve(y)

Analyze how the time-series range changes across time.

pyhctsa.operations.stationarity.drifting_mean(y)

Measures mean drift by analyzing mean and variance in time-series subsegments.

pyhctsa.operations.stationarity.local_global(y)

Compare local statistics to global statistics of a time series.

pyhctsa.operations.stationarity.fit_polynomial(y)

Goodness of a polynomial fit to a time series

pyhctsa.operations.stationarity.ts_length(y)

Length of an input data vector.

pyhctsa.operations.stationarity.std_nth_deriv(y)

Standard deviation of the nth derivative of the time series.

pyhctsa.operations.stationarity.trend(y)

Quantifies various measures of trend in a time series.

pyhctsa.operations.stationarity.stat_av(y[, ...])

Simple mean-stationarity metric using the StatAv measure.

pyhctsa.operations.stationarity.sliding_window(y)

Sliding window measures of stationarity.

Surrogates

pyhctsa.operations.surrogates.surrogate_test(x)

Analyzes test statistics obtained from surrogate time series.

Symbolic

pyhctsa.operations.symbolic.surprise(y[, ...])

Quantifies how surprised you would be of the next data point given recent memory.

pyhctsa.operations.symbolic.motif_two(y[, ...])

Compute local motifs in a binary symbolization of the input time series.

pyhctsa.operations.symbolic.motif_three(y[, ...])

Motifs in a coarse-graining of a time series to a 3-letter alphabet.

pyhctsa.operations.symbolic.binary_stretch(x)

Characterize stretches of 0s or 1s in a binarized time series.

pyhctsa.operations.symbolic.binary_stats(y)

Compute statistics on a binary symbolisation of the input time series.

pyhctsa.operations.symbolic.transition_matrix(y)

Transition probabilities between time-series states.

pyhctsa.operations.symbolic.coarse_grain(y, ...)

Coarse-grains a continuous time series to a discrete alphabet.

Wavelet

pyhctsa.operations.wavelet.wl_coeffs(y[, ...])

Wavelet decomposition of the time series.

pyhctsa.operations.wavelet.detail_coeffs(y)

Detail coefficients of a wavelet decomposition.

pyhctsa.operations.wavelet.cwt(y[, w_name, ...])

Continuous wavelet transform of a time series.

pyhctsa.operations.wavelet.dwt_coeff(y[, ...])

Discrete wavelet transform coefficients.

pyhctsa.operations.wavelet.scal_2_freq(y[, ...])

Frequency components in a periodic time series.

pyhctsa.operations.wavelet.wfbm(x)

Parameters of fractional Gaussian noise/Brownian motion in a time series.