# SepFree NMF: A Toolbox for Analyzing the Kinetics of Sequential Spectroscopic Data
## 2 Theoretical Foundations
### SepFree NMF  
SepFree NMF (separability-assumption free non-negative matrix factorization) is a novel method to decompose sequentially measured spectra. Decomposing the dataset into a matrix carrying the kinetic information and a matrix containing the peak intensities information is the first step for the computation of the memory effect of the compounds; this section briefly introduces the characteristics of the method. The spectral dataset \(M\in\mathbb{R}^{n\times m}\) consists of a spectrum measured at \(m\) time points and for \(n\) wavenumbers. Then, the matrix \(M\) contains the information about the dynamics of a number \(r\) of compounds. The SepFree NMF factorizes \(M\) into the multiplication of a matrix \(W\), describing the peak intensities of the compounds, and a matrix \(H\), describing their relative concentration proportions in the system as function of time [6]  
\[M=WH \tag{2}\]  
with the matrix \(W\in\mathbb{R}^{n\times r}\) and the matrix \(H\in\mathbb{R}^{r\times m}_{+}\). The matrix \(W\) represents \(r\)-component fingerprints as a function of the wavenumber. Each of the \(r\) rows of the matrix \(H\) represents the proportion of the \(r\)-compounds as function of time \(t\). Since \(H\) represents proportions of system's states, its entries are required to be positive and between \([0,1]\). The column sum of \(H\) is a partition of unity. Each of the \(r\) columns of the matrix \(W\) represents the intensity of a compound as a function of the wavenumber (or wavenumbers). With the standard ansatz, the matrix \(M\) has to be \(r\)-separable [14; 15]. A matrix \(M\) is \(r\)-separable if there exists a factorization for which all \(r\)-columns of \(W\) are equal to a column of \(M\)[6]. This implies that a compound is present at least once as 100% at a time \(t\) in the process described by \(M\), while all the other compounds have a concentration of 0% at \(t\). However, in experiments, one measures always a mixture of compounds, and the forenamed situation in which a compound constitutes the entire system is not realistic. If only one compound is present at a specific time, then all the sample molecules would be in the same condition at that point in time. Thus, the auxiliary of the separability assumption makes this algorithm particularly appropriate for the analysis of experimental data. The authors of [6] model the time evolution of the columns in \(H\) as a Markov process. The evolution of the compounds at time \(t+\tau\) depends only on the conditions at time \(t\), and it is given by (1), whereby \(K\in\mathbb{R}^{r\times r}\) is a row-stochastic transition matrix. Its elements \(K(\tau)_{ij}\), \(i,j=1,\ldots,r\), describe the transition probability from \(i\) to \(j\) after a time-step \(\tau\). In this  
Figure 2: Qualitative comparison of kinetic profiles with MCR and SepFree NMF. MCR (**left**), SepFree NMF of rank 2 (**middle**), SepFree NMF of rank 3 (**right**). model, \(K(\tau)\) is fixed for the time interval \(\tau\). The transition probability in the process does not explicitly depend on time, and the process is said to be autonomous [16]. The factorization of the matrix \(M\) as a product of \(W\) and \(H\) has not a unique solution [17]. One can find a set of solutions, but not all the solutions of this set will satisfy the necessary conditions the decomposition has to have to represent the system. To select the decomposition that better reconstructs the data matrix \(M\) from the set of solutions, a penalty function \(\Psi\) is defined [6]. This function weights the required structural properties of the decomposition; the optimal solution for the decomposition of \(M\) is obtained by minimizing the value of \(\Psi\). The requirements the obtained matrices have to meet are five:  
1. The entries of \(W\) are non-negative;
2. The entries of \(H\) are non-negative;
3. \(H\) is column-stochastic;
4. The entries of \(K\) are non-negative;
5. \(K\) is row-stochastic. To simplify the reading, we drop the \(\tau\) of \(K(\tau)\).