seq2feature_ngram {ProcData} | R Documentation |
ngram feature extraction
Description
seq2feature_ngram
extracts ngram features from response processes.
Usage
seq2feature_ngram(seqs, level = 2, type = "binary", sep = "\t")
Arguments
seqs |
an object of class |
level |
an integer specifying the max length of ngrams |
type |
a character string ( |
sep |
action seperator within ngram. |
Details
Three types of ngram features can be extracted. type = "binary"
gives
binary ngram features indicating whether an ngram appears in a response process.
type = "freq"
gives ngram frequency features. Each feature is the count of
the corresponding ngram in a response process. type = "weighted"
gives the
weighted ngram features proposed in He and von Davier (2015).
Value
a matrix of ngram features
References
He Q., von Davier M. (2015). Identifying Feature Sequences from Process Data in Problem-Solving Items with N-Grams. In: van der Ark L., Bolt D., Wang WC., Douglas J., Chow SM. (eds) Quantitative Psychology Research. Springer Proceedings in Mathematics & Statistics, vol 140. Springer, Cham.
See Also
Other feature extraction methods: aseq2feature_seq2seq
,
atseq2feature_seq2seq
,
seq2feature_mds_large
,
seq2feature_mds
,
seq2feature_seq2seq
,
tseq2feature_seq2seq
Examples
seqs <- seq_gen(100)
theta <- seq2feature_ngram(seqs)