| Title: | The Online Principal Component Estimation Method |
|---|---|
| Description: | The online principal component method can process the online data set. The philosophy of the package is described in Guo G. (2018) <doi:10.1080/10485252.2018.1531130>. |
| Authors: | Chunjie Wei [aut, cre], Guangbao Guo [aut] |
| Maintainer: | Chunjie Wei <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.2 |
| Built: | 2026-05-25 08:30:49 UTC |
| Source: | https://github.com/cran/OPC |
A data frame with 1024 observations on the following 10 variables.
data("Cloud")data("Cloud")
A data frame with 1024 observations on the following 10 variables.
x1a numeric vector
x2a numeric vector
x3a numeric vector
x4a numeric vector
x5a numeric vector
x6a numeric vector
x7a numeric vector
x8a numeric vector
x9a numeric vector
x10a numeric vector
The data sets we propose to analyse are constituted of 1024 vectors, each vector includes 10 parameters. You can think of it as a 1024*10 matrix.
The Cloud data set comes from the UCI database.
NA
data(Cloud) ## maybe str(Cloud) ; plot(Cloud) ...data(Cloud) ## maybe str(Cloud) ; plot(Cloud) ...
A data frame with 10000 observations on the following 9 variables.
data("HTRU")data("HTRU")
A data frame with 10000 observations on the following 9 variables.
Aa numeric vector
Ba numeric vector
Ca numeric vector
Da numeric vector
Ea numeric vector
Fa numeric vector
Ga numeric vector
Ha numeric vector
Ia numeric vector
Pulsar candidates collected during the HTRU survey. Pulsars are a type of star, of considerable scientific interest. Candidates must be classified in to pulsar and non-pulsar classes to aid discovery.
The HTRU data set comes from the UCI database.
NA
data(HTRU) ## maybe str(HTRU) ; plot(HTRU) ...data(HTRU) ## maybe str(HTRU) ; plot(HTRU) ...
The incremental principal component method can handle online data sets.
IPC(data, m, eta)IPC(data, m, eta)
data |
is an online data set |
m |
is the number of principal component |
eta |
is the proportion of online data to total data |
T2,T2k,V,Vhat,lambdahat,time
library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon IPC(data=data,m=m,eta=0.8)library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon IPC(data=data,m=m,eta=0.8)
The perturbation principal component method can handle online data sets.
PPC(data, m, eta)PPC(data, m, eta)
data |
is an online data set |
m |
is the number of principal component |
eta |
is the proportion of online data to total data |
T2,T2k,V,Vhat,lambdahat,time
library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon PPC(data=data,m=m,eta=0.8)library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon PPC(data=data,m=m,eta=0.8)
The stochastic approximate component method can handle online data sets.
SAPC(data, m, eta, alpha)SAPC(data, m, eta, alpha)
data |
is a online data set |
m |
is the number of principal component |
eta |
is the proportion of online data to total data |
alpha |
is the step size |
T2,T2k,V,Vhat,lambdahat,time
library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon SAPC(data=data,m=m,eta=0.8,alpha=1)library(MASS) n=2000;p=20;m=9; mu=t(matrix(rep(runif(p,0,1000),n),p,n)) mu0=as.matrix(runif(m,0)) sigma0=diag(runif(m,1)) F=matrix(mvrnorm(n,mu0,sigma0),nrow=n) A=matrix(runif(p*m,-1,1),nrow=p) D=as.matrix(diag(rep(runif(p,0,1)))) epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n) data=mu+F%*%t(A)+epsilon SAPC(data=data,m=m,eta=0.8,alpha=1)
A data frame with 177 observations on the following 13 variables.
data("Wine")data("Wine")
A data frame with 177 observations on the following 13 variables.
X14.23a numeric vector
X1.71a numeric vector
X2.43a numeric vector
X15.6a numeric vector
X127a numeric vector
X2.8a numeric vector
X3.06a numeric vector
X.28a numeric vector
X2.29a numeric vector
X5.64a numeric vector
X1.04a numeric vector
X3.92a numeric vector
X1065a numeric vector
These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars. The analysis determined the quantities of 13 constituents found in each of the three types of wines.
The Wine data set comes from the UCI database.
NA
data(Wine) ## maybe str(Wine) ; plot(Wine) ...data(Wine) ## maybe str(Wine) ; plot(Wine) ...