Three-Mode Principal Component Analysis: Theory and Applications