set.seed(1234) knitr::opts_chunk$set(cache = TRUE, collapse = TRUE)
The unified SFPCA (Sparse and Functional Principal Component Analysis) method enjoys many advantages over existing approaches to regularized PC, because it
allows for arbitrary degrees and forms of regularization;
unifies many existing methods;
admits a tractable, efficient, and theoretically well-grounded algorithm.
The problem is formulated as follows.
$$\max_{u,\,,v}{u}^{T} {X} {v}-\lambda_{{u}} P_{{u}}({u})-\lambda_{{v}} P_{{v}}({v})$$ $$\text{s.t. } \| u \| _ {S_u} \leq 1, \, \| v \| _ {S_v} \leq 1.$$ Typically, we take ${S}{{u}}={I}+\alpha{{u}} {\Omega}{{u}}$ where $\Omega_u$ is the second- or fourth-difference matrix, so that the $\|u \|{S_u}$ penalty term encourages smoothness in the estimated singular vectors. $P_u$ and $P_v$ are sparsity inducing penalties that satisfy the following conditions:
$P \geq 0$, $P$ defined on $[0,+\infty)$;
$P(cx) = c P (x), \forall \, c > 0$.
Currently, the package supports arbitrary combination of the following.
So far, we have incorporated the following penalties in MoMA. The code under each penalty is only an example specification of the penalty. They should be carefully tailored based on your particular data set.
moma_lasso
;
``` {r eval = FALSE}non_negative
: impose non-negativity constraint or notmoma_lasso(non_negative = TURE)
* SCAD `moma_lasso`(smoothly clipped absolute deviation), see `moma_scad`; ``` {r eval = FALSE} # `gamma` is the non-convexity parameter moma_scad(gamma = 3, non_negative = TURE)
moma_mcp
;
``` {r eval = FALSE}gamma
is the non-convexity parametermoma_mcp(gamma = 3, non_negative = TURE)
* SLOPE (sorted $\ell$-one penalized estimation), see `moma_slope`; ``` {r eval = FALSE} # `gamma` is the non-convexity parameter moma_slope(gamma = 3, non_negative = TURE)
moma_grplasso
;
``` {r eval = FALSE}g
is a factor indicating the groupingmoma_grplasso(g = g, non_negative = TURE)
* Fused LASSO, see `moma_fusedlasso`; ``` {r eval = FALSE} # `algo` is indicates which algorithm to solve the proximal operator # "dp": dynamic programming, "path": path-based algorithm moma_fusedlasso(algo = "dp")
moma_l1tf
;
``` {r eval = FALSE}l1tf_k = 2
imposes piece-wise linearmoma_l1tf(l1tf_k = 2)
* Sparse fused LASSO, see `moma_spfusedlasso`; ``` {r eval = FALSE} # `lambda2` is penalty level for the adjacent difference moma_spfusedlasso(lambda2 = 1)
moma_cluster
.
``` {r eval = FALSE}w
is a symmectric matrix, whose entry, w[i][j], is the weight connectingmoma_cluster(w = w)
#### Parameter selection schemes * Exhaustive search * Nested BIC. See `select_scheme` for details. #### Multivariate methods * PCA (Principal Component Analysis). See `moma_sfpca`. * CCA (Canonical Component Analysis). See `moma_sfcca`. * LDA (Linear Discriminant Anlsysis). See `moma_sflda`. * PLS (Partial Least Square) (TODO) * Correspondence Analysis (TODO) #### Deflation schemes * Hotelling's deflation (PCA) * Projection deflation (PCA, CCA, LDA) * Schur's complement (PCA) ## Excellent User Experience * Easy-to-use functions. Let $\Delta$ be a second-difference matrix of appropriate size, such that $u^T\Delta u = \sum_i (u_{i} - u_{i-1} )^2$. For a matrix $X$, one line of code can solve the following penalized singular value decomposition problem: $$\max_{u,\, v} \, {u}^{T} {X} {v} - 4 \sum_i | v_i - v_{i-1}|$$ $$ \text{s.t. } u^T(I + 3 \Delta) u \leq 1,\, v^Tv \leq 1.$$ ```r # `p` is the length of `u` moma_sfpca(X, center = FALSE, v_sparse = moma_fusedlasso(lambda = 4), u_smooth = moma_smoothness(second_diff_mat(p), alpha = 3) )
R6 methods to support access of results.
Shiny supports interation with MoMA.
Fast. MoMA
uses the Rcpp
and RcppArmadillo
libraries for speed
[@Eddelbuettel:2011; @Eddelbuettel:2014; @Sanderson:2016].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.