Skip to content

ammaciel/FeaturesTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

featuresTS

This package perfom features extraction from time series data. The attributes extracted consist of statistical values, such as, maximum value, minimum value, standart deviation, variance, mean, median, amplitude, skewness, kurtosis, area under curve and perimeter of the curve from time series.

With package "featuresST" is possible to filter time series using Savitzky-Golay filter, to divide time series data in parts as for annual or an interval defined by user and also to perform features extraction using time series data divided for year or another interval, as also generate statistical values about time series data and/or subintervals this time series. Besides is possible to extract focal neighborhood features for time series.

With this features the user can to perform data mining on time series data to classify land use and land conver.

Time series data can be found using package wtss at http://github.com/gqueiroz/wtss

Prerequisites:

  • Git
  • R
  • Rstudio
  • Time series data from wtss package
  • The focalFeaturesTS function requires that the igraph package is available.

How to use the package:

  • Open RStudio
  • Install devtools install.packages("devtools")
  • Load devtools library(devtools)
  • Install the featuresTS package install_github("ammaciel/FeaturesTS")

Examples 1 - Only one time series:

  • Load the featuresTS package library(featuresTS)
  • Load a example data data("dataTS")
  • Create new data.frame df df <- dataTS
  • Apply the filterTS function on df data frame dataFiltered <- filterTS(fileTS = df, nameColumnValue = "value", outlier = TRUE, value= -0.300)
  • See filtered time series plot.ts(dataFiltered$original.value, lwd = 2, col="black");lines(dataFiltered$filtered.value, lwd=2, col="red")
  • Apply splitTS fcuntion to divide time series for year splitTS(dataFiltered,2002,2005,"date",typeInterval = "annual")
  • Get features from time series divided in annual values without subintervals example1 <- featuresExtractionTS(fileTS = ts.annual_2002, nameColumnValue = "filtered.value", subInterval = FALSE)
  • Get features from time series divided in annual values with subintervals example2 <- featuresExtractionTS(fileTS = ts.annual_2002, nameColumnValue = "filtered.value", subInterval = TRUE, numberSubIntervals = 3)
  • Show data frames example1 and example2 utils::View(example1) utils::View(example2)

Examples 2 - For a set of time series to extraction of focal neighborhood features:

  • Load the featuresTS package library(featuresTS)
  • Load the igraph package library(igraph)
  • Load a example data data("dataFeaturesTS")
  • Create new data.frame df df <- dataFeaturesTS
  • Apply the focalFeaturesTS function on df data frame df dfTSwithFocalFeatures <- focalFeaturesTS(fileTS = df, valueToleranceRaster = 0.000891266)
  • See new data.frame head(dfTSwithFocalFeatures)
  • See plots with values of focal neighborhood to mean, max, min and standard deviation for features mean, max, min, stardard deviation and amplitude.

About

Features extraction from time series in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages