Learn R Programming

dtwSat (version 0.1.0)

classfyIntervals: Classify time intervals

Description

This function retrieves the best alignment within each interval of classification based on the TWDTW distance

Usage

classfyIntervals(x, from, to, by, breaks = NULL, normalized = TRUE, overlap = 0.7, threshold = Inf)

Arguments

x
A dtwSat object or a data.frame similar to the slot alignments in object dtwSat-class
from
A Date object
to
A Date object
by
A character with the intevals size, e.g. ''6 month''
breaks
A vector of class Date
normalized
Use normalized TWDTW distance. Default is TRUE
overlap
A number between 0 and 1. The minimum overlapping between the one alignment and the interval of classification. Default is 1, i.e. 100%
threshold
A number. The TWDTW threshold, i.e. the maximum TWDTW cost for consideration. Default is Inf

Value

object of class data.frame with the best alignment for each interval

Examples

Run this code
malig = mtwdtw(query.list, template, weight = "logistic",
         alpha = 0.1, beta = 100)

# Classify interval
from = as.Date("2009-09-01")
to = as.Date("2013-09-01")
best_class = classfyIntervals(x=malig, from=from, to=to, by = "6 month",
             normalized=TRUE, overlap=.5, threshold=Inf)
best_class

Run the code above in your browser using DataLab