Skip to contents

Computes pairwise correlation between synergy weight vectors from two decompositions. Uses best-match pairing.

Usage

synergyCompare(result1, result2)

Arguments

result1

First result from muscleSynergy.

result2

Second result from muscleSynergy.

Value

A data.frame with columns: synergy1, synergy2, correlation.

References

De Luca, C.J. (1997). "The use of surface electromyography in biomechanics." Journal of Applied Biomechanics, 13(2), 135-163. doi:10.1123/jab.13.2.135

Merletti, R. & Parker, P.A. (2004). "Electromyography: Physiology, Engineering, and Non-Invasive Applications." Wiley-IEEE Press. doi:10.1002/0471678384

See also

muscleSynergy() for computing synergy decompositions, synergyReconstruct() for reconstructing data from synergies

Examples

pe <- make_emg(n_time = 2000, n_channels = 4, sr = 1000)
s1 <- muscleSynergy(pe, n_synergies = 2, method = "nmf", seed = 1)
s2 <- muscleSynergy(pe, n_synergies = 2, method = "nmf", seed = 2)
synergyCompare(s1, s2)
#>   synergy1 synergy2 correlation
#> 1        1        1   0.9999479
#> 2        2        2   0.9999337