Type: | Package |
Title: | Trend of High-Dimensional Time Series Matrix Estimation |
Version: | 2.0.21 |
Date: | 2025-03-28 |
Description: | Matrix factorization for multivariate time series with both low rank and temporal structures. The procedure is the one proposed by Alquier, P. and Marie, N. "Matrix factorization for multivariate time series analysis." Electronic Journal of Statistics, 13(2), 4346-4366 (2019). |
Depends: | R (≥ 3.5.0) |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.3.2 |
Imports: | softImpute, capushe, fda |
NeedsCompilation: | no |
Packaged: | 2025-03-28 10:15:18 UTC; lebarbier |
Author: | Emilie Lebarbier [aut, cre], Nicolas Marie [aut], Amélie Rosier [aut] |
Maintainer: | Emilie Lebarbier <emilie.lebarbier@parisnanterre.fr> |
Repository: | CRAN |
Date/Publication: | 2025-03-28 10:40:20 UTC |
Example of data
Description
A simulated matrix with a low rank k and with temporal structure based on independent Gaussian.
Usage
data(Data_Series)
Format
A matrix with 30 rows (30 times series) and 100 columns (size of each temporal series).
Examples
library(TrendTM)
data(Data_Series)
head(Data_Series)
TrendTM(Data_Series,k_max=3)
It performs the factorization for a fixed rank k and a temporal structure with a fixed tau
Description
It performs the factorization for a fixed rank k and a temporal structure with a fixed tau
Usage
FM_kt(
Data_Series,
k = 2,
tau = floor(n/2),
struct_temp = "none",
type_soft = "als"
)
Arguments
Data_Series |
the data matrix with d rows and n columns containing the d temporal series with size n. |
k |
the fixed rank of X. Default is 2. |
tau |
the fixed value for tau . Default is |
struct_temp |
a name indicating the temporal structure. Could be |
type_soft |
the option |
Value
A list containing
-
M_est
the estimation of M. -
U_est
the component U of the decomposition ofM_est
. -
V_est
the component V of the decomposition ofM_est
. -
contrast
the Frobenius norm of X-M_est.
It performs the slope heuristic for the selection of a penalty constant
Description
It performs the slope heuristic for the selection of a penalty constant
Usage
OurSlope(contrast, grille, penalty)
Arguments
contrast |
the Frobenius norm of X-M_est for all the value of the grid |
grille |
the ordered grid of potential values for the penalty constant |
penalty |
the penalty calculated for each value of the grid |
Value
Model_Selected
the selected parameter
Matrix Factorization for Multivariate Time Series Analysis
Description
It is the main function. It performs the factorization for a selected rank and a temporal structure with a selected tau if the selection is requested otherwise it is fixed
Usage
TrendTM(
Data_Series,
k_select = FALSE,
k_max = 20,
struct_temp = "none",
tau_select = FALSE,
tau_max = floor(n/2),
type_soft = "als"
)
Arguments
Data_Series |
the data matrix with d rows and n columns containing the d temporal series with size n. |
k_select |
a boolean indicating if the rank of the matrix Data_Series will be selected. Default is FALSE. |
k_max |
the fixed rank of Data_Series if |
struct_temp |
a name indicating the temporal structure. Could be |
tau_select |
a boolean indicating if the parameter tau will be selected. This can be possible only when |
tau_max |
the fixed value for tau if |
type_soft |
the option |
Details
The penalty constant(s) is(are) calibrated using the slope heuristic from package capushe. We adapt this heuristic as follows: the final dimension is the one correspind to the majority of the selected dimension for the considered different penalties.
Value
A list containing
-
k_est
the selected rank ifk_select==TRUE
ork_max
ifk_select==FALSE
. -
tau_est
the selected tau iftau_select==TRUE
ortau_max
iftau_select==FALSE
. -
U_est
the component U of the decomposition of the final estimatorM_est
. -
V_est
the component V of the decomposition of the final estimatorM_est
. -
M_est
the estimation of M. -
contrast
the Frobenius norm of Data_Series-M_est. This is a value whenk_select==FALSE
andtau_select==FALSE
, a vector whenk_select==TRUE
ortau_select==TRUE
, and a matrix whenk_select==TRUE
andtau_select==TRUE
withk_max
rows andtau_max
columns.
Examples
data(Data_Series)
result <- TrendTM(Data_Series, k_max = 3)