pyts.multivariate.image.联合递归图¶
-
class
pyts.multivariate.image.JointRecurrencePlot(dimension=1, time_delay=1, threshold=None, percentage=10)[来源]¶ 联合递归图。
递归图是一种图像,用于表示从原始时间序列中提取的轨迹之间的距离。
联合递归图是针对多元时间序列的递归图扩展:它是通过对多元时间序列的每个特征获得的递归图进行Hadamard乘积得到的。
Parameters: - dimension : int or float (default = 1)
轨迹的维度。如果是浮点数,则表示每个时间序列大小的百分比,必须在0到1之间。
- time_delay : int or float (default = 1)
轨迹中两个连续点之间的时间间隔。如果是浮点数,则表示每个时间序列大小的百分比,必须在0到1之间。
- threshold : float, ‘point’, ‘distance’ or None or list thereof (default = None)
最小距离的阈值。如果为None,则不会对递归图进行二值化处理。如果
threshold='point',则计算阈值使得percentage百分比的点小于该阈值。如果threshold='distance',则阈值计算为最大距离的percentage百分比。- percentage : int, float or list thereof (default = 10)
如果
threshold='point'则表示黑点的百分比,如果threshold='distance'则表示最大距离阈值的百分比。当threshold为浮点数或None时该参数将被忽略。请注意该百分比是针对每个递归图独立计算的,这意味着在联合递归图中黑点的比例可能会低于percentage百分比。
参考文献
[1] M. Romano, M. Thiel, J. Kurths 和 W. con Bloh, "多元递归图". 物理快报A (2004) 示例
>>> from pyts.datasets import load_basic_motions >>> from pyts.multivariate.image import JointRecurrencePlot >>> X, _, _, _ = load_basic_motions(return_X_y=True) >>> transformer = JointRecurrencePlot() >>> X_new = transformer.transform(X) >>> X_new.shape (40, 100, 100)
方法
__init__([dimension, time_delay, threshold, …])Initialize self. fit([X, y])Pass. fit_transform(X[, y])Fit to data, then transform it. get_params([deep])Get parameters for this estimator. set_params(**params)Set the parameters of this estimator. transform(X)Transform each time series into a joint recurrence plot. -
__init__(dimension=1, time_delay=1, threshold=None, percentage=10)[来源]¶ 初始化自身。查看 help(type(self)) 获取准确的签名信息。
-
fit_transform(X, y=None, **fit_params)¶ 拟合数据,然后进行转换。
使用可选参数fit_params将转换器适配到X和y,并返回转换后的X版本。
参数: - X : array-like, shape = (n_samples, n_features, n_timestamps)
多元时间序列。
- y : None or array-like, shape = (n_samples,) (default = None)
目标值(无监督转换时为None)。
- **fit_params : dict
额外的拟合参数。
返回值: - X_new : array
转换后的数组。
-
get_params(deep=True)¶ 获取此估计器的参数。
参数: - deep : bool, default=True
如果为True,将返回此估计器及其包含的子估计器的参数。
返回值: - params : dict
参数名称映射到对应的值。