Many problems in signal processing and machine learning generate massive amounts of multidimensional data. Data sources from sensor networks and Internet-of-Things applications promise a wealth of interaction data that can be naturally represented as tensors. Tensor decompositions have gained a steadily increasing popularity in data mining and machine learning, with applications in psychometrics, chemometrics, signal processing, computer vision, neuroscience, graph analysis, and more. For example, time-varying social networks collected from wearable proximity sensors can be represented as 3-way tensors, and tensor decomposition can be used to extract community structures with their structural and temporal signatures.
The current standard framework for working with tensors, however, is Matlab. We will show how tensor decompositions can be carried out using Python, how to obtain latent components and how they can be interpreted, and what are some applications of this technique in the academy and industry. We will see a use case where a Python implementation of tensor decomposition is applied to a dataset that describes face-to-face social interactions of people, collected using the SocioPatterns platform. This platform was deployed in different settings such as conferences, schools and hospitals, in order to support mathematical modelling and simulation of airborne infectious diseases. Tensor decomposition has been used in these scenarios to solve different types of problems: it is used for data cleaning, where time-varying graph anomalies can be identified and removed from data; it have been also used to assess the impact of face-to-face interactions in the spreading of diseases. These examples show the potential of this technique in data mining and machine learning applications.