MyNixOS website logo
Description

Cyclic Wave Analysis for Time-Series Clustering.

A modular toolkit for feature extraction and density-based clustering of time-series data. It provides classical statistical, discrete wavelet, Hilbert-based phase, and circular statistical features. The Hilbert-based phase representation can support the analysis of periodic patterns, phase relationships, and circular behavior in time-series data. The package supports DBSCAN and OPTICS clustering, cluster evaluation, visualization, data preparation, and comparison of multiple feature extraction and clustering combinations. Methods are described in Karakaya and Purutcuoglu (2026) <doi:10.15672/hujms.1821412> and Karakaya et al. (2026) <doi:10.1007/978-3-032-17020-0_27>.

Cyclic Wave Analysis

Classical, wavelet-based, and circular feature extraction for density-based time-series clustering in R.

cyclicwave is a modular R package for feature extraction and density-based clustering of time-series data. It provides classical statistical features, discrete wavelet features, Hilbert-based phase representations, and circular statistical features.

The package applies the Hilbert transform to obtain the analytic signal and instantaneous phase of time-series data. The resulting phase values provide a circular representation that may help reveal periodic patterns, phase relationships, and circular behavior that may not be directly visible in the original signal. Circular statistics and circular distance measures can then be calculated from this phase representation.

The package includes DBSCAN and OPTICS for density-based clustering. These methods return cluster assignments and identify observations that are not assigned to dense regions as noise. Noise labels can be examined as part of the clustering results, but the package does not apply a separate anomaly detection algorithm.

The package also provides data preparation, cluster evaluation, visualization, and a comparison function that runs multiple feature extraction and clustering combinations.

Installation

Install the package from a local source file:

install.packages(
"cyclicwave_0.1.0.tar.gz",
repos = NULL,
type = "source"
)

During package development, the package can be loaded directly from the project directory:

devtools::load_all()

After installation, load the package with:

library(cyclicwave)

Quick Start

The following example applies DBSCAN to a simple two-dimensional dataset and evaluates the clustering result using the Davies-Bouldin Index.

library(cyclicwave)

set.seed(1)

X <- rbind(
  matrix(rnorm(60, mean = 0, sd = 0.5), ncol = 2),
  matrix(rnorm(60, mean = 5, sd = 0.5), ncol = 2),
  matrix(rnorm(60, mean = 10, sd = 0.5), ncol = 2)
)

result <- run_dbscan(
  X,
  eps = 1,
  min_pts = 5
)

result$n_clusters
result$n_noise
table(result$cluster)

dbi <- davies_bouldin(
  X,
  result$cluster
)

dbi

plot_clusters_pca(
  X,
  result$cluster
)

Lower Davies-Bouldin Index values generally indicate more compact and better-separated clusters.

Authors

Şule Şevval Karakaya

Department of Biomedical Engineering Middle East Technical University Ankara, Türkiye

Email: [email protected]

Ahmet Bursalı

Department of Computer Science Dokuz Eylül University İzmir, Türkiye

Intelligent Application DC Department Huawei Turkey R&D Center İstanbul, Türkiye

Email: [email protected]

Vilda Purutçuoğlu

Department of Biomedical Engineering Middle East Technical University Ankara, Türkiye

Department of Statistics Middle East Technical University Ankara, Türkiye

Email: [email protected]

Dependencies

The package uses the following R packages:

  • dbscan
  • gsignal
  • waveslim
  • MASS
  • e1071
  • ggplot2

The FNN package is optional and provides faster nearest-neighbor calculations for plot_k_distance().

License

This package is distributed under the MIT License. See the LICENSE file for details.

Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows