Description Usage Arguments Details Value Examples
View source: R/IRASD_RegScoreInput.R
Results for Irregular Activity Sequence Detection with Regular Sequence Score as an Input
1 2 3 4 5 6 7 8 9 10 11 12 | IRASD_RegScoreInput(
regseqscore,
newseqdf,
seqdf,
timetype,
k,
beta,
lam,
percentpwr,
bndwidth,
kern
)
|
regseqscore |
Regular sequence scores. |
newseqdf |
Dataframe of new sequences to be tested: first column time stamps in POSIXct format, second column sequence vector in factor format. |
seqdf |
Dataframe of regular sequences: first column time stamps in POSIXct format, second column sequence vector in factor format. |
timetype |
ime window for separating the dataset, i.e. day = '%Y-%m-%d', week = '%Y-%W' and month '%Y-%m'. |
k |
Maximum length of sequence silhouette. |
beta |
Score parameter. |
lam |
Score parameter. |
percentpwr |
Significance level. |
bndwidth |
Bandwidth for the KDE (refer to stats::density function for options). |
kern |
Kernel of choice for the KDE (refer to stats::density function for options). |
Ensure lam(k-1)k/2<beta to comply with the method constraints.
A list with the results of the test, showing which SQS have flagged as irregular.
1 2 3 4 5 6 7 8 9 10 11 | seqdf <- data.frame(Time = c(
"2020-01-01 00:10:09", "2020-01-01 01:12:34", "2020-01-02 06:38:09",
"2020-01-02 07:21:51"
), Cat = as.factor(c("A", "B", "A", "C")))
newseqdf <- data.frame(
Time = c("2020-01-03 01:30:20", "2020-01-03 04:19:14", "2020-01-03 06:51:29"),
Cat = as.factor(c("A", "B", "A"))
)
# For daily data:
regseqscore <- RegScoreWrapper(seqdf, "%Y-%m-%d", 2, 1, 0.5)
IRASD_RegScoreInput(regseqscore, newseqdf, seqdf, "%Y-%m-%d", 2, 1, 0.5, 0.05, "nrd0", "gaussian")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.