API文档

pyts Python软件包的完整API文档。

pyts.approximation: 近似算法

pyts.approximation 模块包含近似算法。

approximation.DiscreteFourierTransform([…]) Discrete Fourier Transform.
approximation.MultipleCoefficientBinning([…]) Bin continuous data into intervals column-wise.
approximation.PiecewiseAggregateApproximation([…]) Piecewise Aggregate Approximation.
approximation.SymbolicAggregateApproximation([…]) Symbolic Aggregate approXimation.
approximation.SymbolicFourierApproximation([…]) Symbolic Fourier Approximation.

pyts.bag_of_words: 词袋算法

pyts.bag_of_words 模块包含词袋算法。

bag_of_words.BagOfWords([window_size, …]) Bag-of-words representation for time series.
bag_of_words.WordExtractor([window_size, …]) Transform discretized time series into sequences of words.

pyts.classification: 分类算法

pyts.classification 模块包含分类算法。

classification.BOSSVS([word_size, n_bins, …]) Bag-of-SFA Symbols in Vector Space.
classification.KNeighborsClassifier([…]) k-nearest neighbors classifier.
classification.LearningShapelets([…]) Learning Shapelets algorithm.
classification.SAXVSM([window_size, …]) Classifier based on SAX-VSM representation and tf-idf statistics.
classification.TimeSeriesForest([…]) A random forest classifier for time series.
classification.TSBF([n_estimators, …]) Time Series Bag-of-Features algorithm.

pyts.datasets: 数据集加载工具

pyts.datasets 模块提供了创建、加载和获取时间序列数据集的工具。

datasets.fetch_ucr_dataset(dataset[, …]) Fetch dataset from UCR TSC Archive by name.
datasets.fetch_uea_dataset(dataset[, …]) Fetch dataset from UEA TSC Archive by name.
datasets.load_basic_motions([return_X_y]) Load and return the Basic Motions dataset.
datasets.load_coffee([return_X_y]) Load and return the Coffee dataset.
datasets.load_gunpoint([return_X_y]) Load and return the GunPoint dataset.
datasets.load_pig_central_venous_pressure([…]) Load and return the PigCVP dataset.
datasets.make_cylinder_bell_funnel([…]) Make a Cylinder-Bell-Funnel dataset.
datasets.ucr_dataset_info([dataset]) Information about the UCR datasets.
datasets.ucr_dataset_list() List of available UCR datasets.
datasets.uea_dataset_info([dataset]) Information about the UEA datasets.
datasets.uea_dataset_list() List of available UEA datasets.

pyts.decomposition: 分解算法

pyts.decomposition 模块包含分解算法。

decomposition.SingularSpectrumAnalysis([…]) Singular Spectrum Analysis.

pyts.image: 图像处理算法

pyts.image 模块包含将时间序列转换为图像的算法。

image.GramianAngularField([image_size, …]) Gramian Angular Field.
image.MarkovTransitionField([image_size, …]) Markov Transition Field.
image.RecurrencePlot([dimension, …]) Recurrence Plot.

pyts.metrics: 指标

pyts.metrics 模块包含各种度量指标。

metrics.boss(x, y) Return the BOSS distance between two arrays.
metrics.dtw([x, y, dist, method, options, …]) Dynamic Time Warping (DTW) distance between two samples.
metrics.itakura_parallelogram(n_timestamps_1) Compute the Itakura parallelogram.
metrics.sakoe_chiba_band(n_timestamps_1[, …]) Compute the Sakoe-Chiba band.
metrics.show_options([method, disp]) Show documentation for additional options of Dynamic Time Warping methods.

pyts.multivariate: 多元时间序列工具

pyts.multivariate 模块包含处理多元时间序列的工具。

分类

multivariate.classification.MultivariateClassifier(…) Classifier for multivariate time series.

图像

multivariate.image.JointRecurrencePlot([…]) Joint Recurrence Plot.

转换

multivariate.transformation.MultivariateTransformer(…) Transformer for multivariate time series.
multivariate.transformation.WEASELMUSE([…]) WEASEL+MUSE algorithm.

实用工具

multivariate.utils.check_3d_array(X) Check that the input is a three-dimensional array.

pyts.preprocessing: 预处理工具

pyts.preprocessing 模块包含预处理算法。

扩展性

preprocessing.MaxAbsScaler() Scale each sample by its maximum absolute value.
preprocessing.MinMaxScaler([sample_range]) Transforms samples by scaling each sample to a given range.
preprocessing.RobustScaler([with_centering, …]) Scale samples using statistics that are robust to outliers.
preprocessing.StandardScaler([with_mean, …]) Standardize time series by removing mean and scaling to unit variance.

转换

preprocessing.PowerTransformer([method, …]) Apply a power transform sample-wise to make data more Gaussian-like.
preprocessing.QuantileTransformer([…]) Transform samples using quantiles information.

离散化

preprocessing.KBinsDiscretizer([n_bins, …]) Bin continuous data into intervals sample-wise.

缺失值填补

preprocessing.InterpolationImputer([…]) Impute missing values using interpolation.

pyts.transformation: 转换算法

pyts.transformation 模块包含转换算法。

transformation.BagOfPatterns([window_size, …]) Bag-of-patterns representation for time series.
transformation.BOSS([word_size, n_bins, …]) Bag of Symbolic Fourier Approximation Symbols.
transformation.ROCKET([n_kernels, …]) RandOm Convolutional KErnel Transformation.
transformation.ShapeletTransform([…]) Shapelet Transform Algorithm.
transformation.WEASEL([word_size, n_bins, …]) Word ExtrAction for time SEries cLassification.

pyts.utils: 实用工具

pyts.utils 模块包含实用工具。

utils.segmentation(ts_size, window_size[, …]) Compute the indices for Piecewise Agrgegate Approximation.
utils.windowed_view(X, window_size[, …]) Return a windowed view of a 2D array.