mopipe.core.analysis.rqa
calc_rqa
def calc_rqa(x: ExtensionArray | np.ndarray,
y: ExtensionArray | np.ndarray,
dim: int = 1,
tau: int = 1,
threshold: float = 0.1,
lmin: int = 2) -> list[float]
Calculate Recurrence Quantification Analysis (RQA) statistics for the input series.
Arguments:
x
ExtensionArray | np.ndarray - The input series.y
ExtensionArray | np.ndarray - The input series.dim
int, optional - The embedding dimension. Defaults to 1.tau
int, optional - The time delay. Defaults to 1.threshold
float, optional - The recurrence threshold. Defaults to 0.1.lmin
int, optional - The minimum line length. Defaults to 2.
Returns:
list[float]
- The RQA statistics.
mopipe.core.common.util
util.py
Common utility functions.
maybe_generate_id
def maybe_generate_id(_id: t.Optional[str] = None,
prefix: t.Optional[str] = None,
suffix: t.Optional[str] = None) -> str
Generate a random id if not provided.
This provides a fluid interface for generating unique ids for various classes. Sometimes, a user may want to provide their own id, and if so, this function will simply return the id they provided. If no id is provided, a random id will be generated.
Parameters
_id : str, optional The id to use. prefix : str, optional The prefix to use for the id. suffix : str, optional The suffix to use for the id.
Returns
str The id.