{"id":13571257,"url":"https://github.com/hendersontrent/theft","last_synced_at":"2025-04-05T12:03:28.020Z","repository":{"id":37186053,"uuid":"351259952","full_name":"hendersontrent/theft","owner":"hendersontrent","description":"R package for Tools for Handling Extraction of Features from Time series (theft)","archived":false,"fork":false,"pushed_at":"2025-03-15T05:16:33.000Z","size":60175,"stargazers_count":40,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T11:05:08.628Z","etag":null,"topics":["data-visualisation","data-visualization","dimensionality-reduction","machine-learning","r","time-series"],"latest_commit_sha":null,"homepage":"https://hendersontrent.github.io/theft/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hendersontrent.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-25T00:17:37.000Z","updated_at":"2025-02-03T10:18:32.000Z","dependencies_parsed_at":"2024-03-11T01:40:01.558Z","dependency_job_id":"7b386327-6c2d-4a85-ba81-e85649de32db","html_url":"https://github.com/hendersontrent/theft","commit_stats":{"total_commits":398,"total_committers":5,"mean_commits":79.6,"dds":0.321608040201005,"last_synced_commit":"51fa12b6ad8ce8d5ae1c6e891e748e9d88ef9162"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendersontrent%2Ftheft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendersontrent%2Ftheft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendersontrent%2Ftheft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendersontrent%2Ftheft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hendersontrent","download_url":"https://codeload.github.com/hendersontrent/theft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332560,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualisation","data-visualization","dimensionality-reduction","machine-learning","r","time-series"],"created_at":"2024-08-01T14:01:00.277Z","updated_at":"2025-04-05T12:03:27.995Z","avatar_url":"https://github.com/hendersontrent.png","language":"R","funding_links":[],"categories":["📦 Packages"],"sub_categories":["R"],"readme":"---\noutput: rmarkdown::github_document\n---\n\n# theft \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"120\" /\u003e\n\n[![CRAN version](https://www.r-pkg.org/badges/version/theft)](https://www.r-pkg.org/pkg/theft)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/theft)](https://www.r-pkg.org/pkg/theft)\n[![DOI](https://zenodo.org/badge/351259952.svg)](https://zenodo.org/badge/latestdoi/351259952)\n\nTools for Handling Extraction of Features from Time series (theft)\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\ncomment = NA, fig.width = 12, fig.height = 8, cache = FALSE)\n```\n\n## Installation\n\nYou can install the stable version of `theft` from CRAN:\n\n```{r eval = FALSE}\ninstall.packages(\"theft\")\n```\n\nYou can install the development version of `theft` from GitHub using the following:\n\n```{r eval = FALSE}\ndevtools::install_github(\"hendersontrent/theft\")\n```\n\nPlease also check out our paper [Feature-Based Time-Series Analysis in R using the theft Package](https://arxiv.org/abs/2208.06146) which discusses the motivation and theoretical underpinnings of `theft` and walks through all of its functionality using the [Bonn EEG dataset](https://pubmed.ncbi.nlm.nih.gov/11736210/) --- a well-studied neuroscience dataset.\n\n## General purpose\n\n`theft` is a software package for R that facilitates user-friendly access to a consistent interface for the extraction of time-series features. The package provides a single point of access to $\u003e1200$ time-series features from a range of existing R and Python packages. The packages which `theft` 'steals' features from currently are:\n\n* [catch22](https://link.springer.com/article/10.1007/s10618-019-00647-x) (R; [see `Rcatch22` for the native implementation on CRAN](https://github.com/hendersontrent/Rcatch22))\n* [feasts](https://feasts.tidyverts.org) (R)\n* [tsfeatures](https://github.com/robjhyndman/tsfeatures) (R)\n* [Kats](https://facebookresearch.github.io/Kats/) (Python)\n* [tsfresh](https://tsfresh.com) (Python)\n* [TSFEL](https://tsfel.readthedocs.io/en/latest/) (Python)\n\nUsers can also calculate their own individual features or sets of features too!\n\nNote that `Kats`, `tsfresh` and `TSFEL` are Python packages. `theft` has built-in functionality for helping you install these libraries---all you need to do is install Python on your machine (preferably Python \u003e=3.10). If you wish to access the Python feature sets, please run `?install_python_pkgs` in R after downloading `theft` or consult the vignette in the package for more information. For a comprehensive comparison of these six feature sets across a range of domains (including computation speed, within-set feature composition, and between-set feature correlations), please refer to the paper [An Empirical Evaluation of Time-Series Feature Sets](https://ieeexplore.ieee.org/document/9679937).\n\nAs of `v0.6.1`, users can also supply their own features to `theft` (see the vignette for more information)!\n\n## Package extensibility\n\nThe companion package [`theftdlc`](https://github.com/hendersontrent/theftdlc) ('`theft` downloadable content'---just like you get [DLCs and expansions](https://en.bandainamcoent.eu/elden-ring/elden-ring/shadow-of-the-erdtree) for video games) contains an extensive suite of functions for analysing, interpreting, and visualising time-series features calculated from `theft`. Collectively, these packages are referred to as the '`theft` ecosystem'.\n\n\u003cimg src=\"man/figures/theft-packages.png\" width=\"400\" height=\"200\" alt=\"Hex stickers of the theft and theftdlc packages for R\" /\u003e\n\nA high-level overview of how the `theft` ecosystem for R is typically accessed by users is shown below. Note that prior to `v0.6.1` of, many of the `theftdlc` functions were contained in `theft` but under other names. To ensure the `theft` ecosystem is as user-friendly as possible and can scale to meet future demands, `theft` has been refactored to be just feature extraction, while `theftdlc` handles all the analysis of the extracted features. The deprecated names---such as `tsfeature_classifier()` being the outdated version of `classify()`---are also still available for now in `theftdlc`.\n\n\u003cimg src=\"man/figures/theft-ecosystem.png\" width=\"900\" alt=\"Schematic of the theft ecosystem in R\" /\u003e\n\nMany more functions and options for customisation are available within the packages and users are encouraged to explore the vignettes and helper files for more information.\n\n## Quick tour\n\n`theft` and `theftdlc` combine to create an intuitive and efficient tidy feature-based workflow. Here is an example of a single code chunk that calculates features using [`catch22`](https://github.com/hendersontrent/Rcatch22) and a custom set of mean and standard deviation, and projects the feature space into an interpretable two-dimensional space using principal components analysis:\n\n```{r, message = FALSE, warning = FALSE, fig.height=6, fig.width=6}\nlibrary(dplyr)\nlibrary(theft)\nlibrary(theftdlc)\n\ncalculate_features(data = theft::simData, \n                   group_var = \"process\", \n                   feature_set = \"catch22\",\n                   features = list(\"mean\" = mean, \"sd\" = sd)) %\u003e%\n  project(norm_method = \"RobustSigmoid\",\n          unit_int = TRUE,\n          low_dim_method = \"PCA\") %\u003e%\n  plot()\n```\n\nIn that example, `calculate_features` comes from `theft`, while `project` and the `plot` generic come from `theftdlc`.\n\nSimilarly, we can perform time-series classification using a similar simple workflow to compare the performance of `catch22` against our custom set of the first two moments of the distribution:\n\n```{r, message = FALSE, warning = FALSE}\ncalculate_features(data = theft::simData, \n                   group_var = \"process\", \n                   feature_set = \"catch22\",\n                   features = list(\"mean\" = mean, \"sd\" = sd)) %\u003e%\n  classify(by_set = TRUE,\n           n_resamples = 5,\n           use_null = TRUE) %\u003e%\n  compare_features(by_set = TRUE,\n                   hypothesis = \"null\") %\u003e%\n  head()\n```\n\nIn this example, `classify` and `compare_features` come from `theftdlc`. \n\nPlease see the vignette for more information and the full functionality of both packages.\n\n## Citation\n\nIf you use `theft` or `theftdlc` in your own work, please cite both the paper:\n\nT. Henderson and Ben D. Fulcher. [Feature-Based Time-Series Analysis in R using the theft Package](https://arxiv.org/abs/2208.06146). arXiv, (2022).\n\nand the software:\n\n```{r, echo = FALSE}\ncitation(\"theft\")\ncitation(\"theftdlc\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendersontrent%2Ftheft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhendersontrent%2Ftheft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendersontrent%2Ftheft/lists"}