This feature is calculated with a 20 x 20 matrix \(B\), in which \(B[i, j] = \sum_{a = 1}^{L-1} H_{a, i}H_{a+1, j}\). \(H\) corresponds to the original HMM matrix, and \(L\) is the number of rows in \(H\). Matrix \(B\) is then flattened to a feature vector of length 400, and returned.
References
Lyons, J., Dehzangi, A., Heffernan, R., Yang, Y., Zhou, Y., Sharma, A., & Paliwal, K. K. (2015). Advancing the Accuracy of Protein Fold Recognition by Utilizing Profiles From Hidden Markov Models. IEEE Transactions on Nanobioscience, 14(7), 761–772.
Examples
h<- hmm_bigrams(system.file("extdata", "1DLHA2-7", package="protHMM"))