biosppy.features.phase_space

biosppy.features.phase_space

This module provides methods to extract phase-space features.

copyright:
  1. 2015-2026 by Instituto de Telecomunicacoes

license:

BSD 3-clause, see LICENSE for more details.

Functions

compute_recurrence_plot([signal, out_dim])

Compute recurrence plot (distance matrix).

phase_space([signal])

Compute phase-space features describing the signal.

recurrence_plot_features([rec_matrix])

Compute recurrence plot features.

biosppy.features.phase_space.compute_recurrence_plot(signal=None, out_dim=224)[source]

Compute recurrence plot (distance matrix).

Parameters:
  • signal (array) – Input signal.

  • out_dim (int, optional) – Output dimension of the recurrence plot.

Returns:

rec_matrix (array) – Recurrence plot matrix.

biosppy.features.phase_space.phase_space(signal=None)[source]

Compute phase-space features describing the signal.

Parameters:

signal (array) – Input signal.

Returns:

feats (ReturnTuple object) – Phase-space features of the signal.

Notes

Check biosppy.features.phase_space.recurrence_plot_features for the list of available features.

biosppy.features.phase_space.recurrence_plot_features(rec_matrix=None)[source]

Compute recurrence plot features.

The following features are based on the GitHub repository by bmfreis: https://github.com/bmfreis/recurrence_python

Parameters:

rec_matrix (array) – Recurrence plot matrix.

Returns:

  • rec_rate (float) – Recurrence rate: the percentage of recurrence points.

  • rec_determ (float) – Recurrence determinism: the percentage of recurrence points which form diagonal lines.

  • rec_lamin (float) – Recurrence laminarity: the percentage of recurrence points which form vertical lines.

  • rec_determ_rec_rate_ratio (float) – Determinism/recurrence rate ratio.

  • rec_lamin_determ_ratio (float) – Laminarity/determinism ratio.

  • rec_avg_diag_line_len (float) – Average length of the diagonal lines.

  • rec_avg_vert_line_len (float) – Average length of the vertical lines.

  • rec_avg_white_vert_line_len (float) – Average length of the white vertical lines.

  • rec_plot_trapping_tm (float) – Trapping time.

  • rec_plot_lgst_diag_line_len (float) – Length of the longest diagonal line.

  • rec_plot_lgst_vert_line_len (float) – Length of the longest vertical line.

  • rec_plot_lgst_white_vert_line_len (float) – Length of the longest white vertical line.

  • rec_plot_entropy_diag_line (float) – Entropy of the probability distribution of the diagonal line lengths.

  • rec_plot_entropy_vert_line (float.) – Entropy of the probability distribution of the vert line lengths.

  • rec_plot_entropy_white_vert_line (float) – Entropy of the probability distribution of the white vert line lengths.