TrendTM: Matrix Factorization for Multivariate Time Series Analysis

View source: R/TrendTM.R

TrendTMR Documentation

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 k_select=FALSE. The maximal value of the rank if k_select=TRUE (must be lower than the minimum between d and n). Default is 20.

struct_temp

a name indicating the temporal structure. Could be none, periodic or smooth. Default is none.

tau_select

a boolean indicating if the parameter tau will be selected. This can be possible only when struct_temp=smooth. Default is FALSE.

tau_max

the fixed value for tau if tau_select=FALSE. The maximal value of tau if tau_select=TRUE (must be lower than n). Default is floor(n/2).

type_soft

the option type of the function softImpute. Default is als.

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 if k_select==TRUE or k_max if k_select==FALSE.

  • tau_est the selected tau if tau_select==TRUE or tau_max if tau_select==FALSE.

  • U_est the component U of the decomposition of the final estimator M_est.

  • V_est the component V of the decomposition of the final estimator M_est.

  • M_est the estimation of M.

  • contrast the Frobenius norm of Data_Series-M_est. This is a value when k_select==FALSE and tau_select==FALSE, a vector when k_select==TRUE or tau_select==TRUE, and a matrix when k_select==TRUE and tau_select==TRUE with k_max rows and tau_max columns.

Examples

data(Data_Series)
result <- TrendTM(Data_Series, k_max = 3)

TrendTM documentation built on April 3, 2025, 6 p.m.

Related to TrendTM in TrendTM...