GammaFunction: Gamma Function for Calculating the Similarity Score

Description Usage Arguments Details Value Examples

View source: R/GammaFunction.R

Description

Gamma Function for Calculating the Similarity Score

Usage

1
GammaFunction(seqlist, allsqs, sqsindex, catvec, beta, lam)

Arguments

seqlist

List of sequences separated by time window.

allsqs

Matrix containing all the possible SQS for this sequence's elements.

sqsindex

Index Matrix indicating which sequences have which SQS's.

catvec

Vector of the different categories found in the sequences.

beta

Score parameter. See below for conditions.

lam

Score parameter. See below for conditions.

Details

Ensure lam(k-1)k/2<beta to comply with the method constraints.

Value

Matrix of similarity scores for different sequences based on the final sequence in the list.

Examples

1
2
3
4
5
6
7
8
df<-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=c('A','B','A','C'))
#For daily data:
seqlist<-SeqList(df,'%Y-%m-%d')
sqslist<-SQSList(seqlist,2)
allsqs<-AllSQS(c('A','B','C'),2)
sqsindex<-SQSIndex(allsqs,sqslist)
GammaFunction(seqlist,allsqs,sqsindex,c('A','B','C'),1,0.5)

jgillam13/IRASD documentation built on Feb. 10, 2021, 9:38 a.m.