Title: | CONCOR for Structural- And Regular-Equivalence Blockmodeling |
---|---|
Description: | The four functions svdcp() ('cp' for column partitioned), svdbip() or svdbip2() ('bip' for bipartitioned), and svdbips() ('s' for a simultaneous optimization of a set of 'r' solutions), correspond to a singular value decomposition (SVD) by blocks notion, by supposing each block depending on relative subspaces, rather than on two whole spaces as usual SVD does. The other functions, based on this notion, are relative to two column partitioned data matrices x and y defining two sets of subsets x_i and y_j of variables and amount to estimate a link between x_i and y_j for the pair (x_i, y_j) relatively to the links associated to all the other pairs. These methods were first presented in: Lafosse R. & Hanafi M.,(1997) <https://eudml.org/doc/106424> and Hanafi M. & Lafosse, R. (2001) <https://eudml.org/doc/106494>. |
Authors: | Roger Lafosse [aut], Fabio Ashtar Telarico [cre, aut] |
Maintainer: | Fabio Ashtar Telarico <[email protected]> |
License: | GPL (>= 3) |
Version: | 2.0.0 |
Built: | 2024-12-01 08:37:36 UTC |
Source: | CRAN |
Relative links of several subsets of variables Yj with another set X. SUCCESSIVE SOLUTIONS
concor(x, y, py, r)
concor(x, y, py, r)
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
The first solution calculates 1+kx normed vectors: the vector u[:,1]
of Rp associated to the ky vectors vi[:,1]
's of Rqi,
by maximizing , with 1+ky norm constraints on the axes.
A component
(x)(u[,k])
is associated to ky partial components (yi)(vi)[,k]
and to a global component y*V[,k]
.
.
(y)(V[,k])
is a global component of the components (yi)(vi[,k])
.
The second solution is obtained from the same criterion, but after replacing each yi by .
And so on for the successive solutions 1,2,...,r. The biggest number of solutions may be r = inf(n, p, qi), when the (x')(yi')(s)
are supposed with full rank; then rmax = min(c(min(py),n,p)). For a set of r solutions, the matrix u'X'YV is diagonal and the
matrices u'X'Yjvj are triangular (good partition of the link by the solutions).
concor.m is the svdcp.m function applied to the matrix x'y.
A list
with following components:
u |
A |
v |
A |
V |
A |
cov2 |
A |
Lafosse, R.
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
# To make some "GPA" : so, by posing the compromise X = Y, # "procrustes" rotations to the "compromise X" then are : # Yj*(vj*u'). x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) co <- concor(x,y,c(3,2,4),2)
# To make some "GPA" : so, by posing the compromise X = Y, # "procrustes" rotations to the "compromise X" then are : # Yj*(vj*u'). x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) co <- concor(x,y,c(3,2,4),2)
Relative proximities of several subsets of variables Yj with another set X. SUCCESSIVE SOLUTIONS
concorcano(x, y, py, r)
concorcano(x, y, py, r)
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
The first solution calculates a standardized canonical component cx[,1]
of x associated to ky
standardized components cyi[,1]
of yi by maximizing .
The second solution is obtained from the same criterion, with ky
orthogonality constraints for having
rho(cyi[,1],cyi[,2])=0
(that
implies rho(cx[,1],cx[,2])=0)
. For each of the 1+ky sets, the r
canonical components are 2 by 2 zero correlated.
The ky matrices (cx)'*cyi are triangular.
This function uses concor function.
A list
with following components:
cx |
a |
cy |
a |
rho2 |
a |
Lafosse, R.
Hanafi & Lafosse (2001) Generalisation de la regression lineaire simple pour analyser la dependance de K ensembles de variables avec un K+1 eme. Revue de Statistique Appliquee vol.49, n.1
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) ca <- concorcano(x,y,c(3,2,4),2)
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) ca <- concorcano(x,y,c(3,2,4),2)
Regression of several subsets of variables Yj by another set X. SUCCESSIVE SOLUTIONS
concoreg(x, y, py, r)
concoreg(x, y, py, r)
x |
are the |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
A list
with following components:
cx |
a |
v |
is a |
V |
is a |
varexp |
is a |
Lafosse, R.
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
Chessel D. & Hanafi M. (1996) Analyses de la Co-inertie de K nuages de points. Revue de Statistique Appliquee vol.44, n.2. (this ACOM analysis of one multiset is obtained by the command : concoreg(Y,Y,py,r))
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) co <- concoreg(x,y,c(3,2,4),2)
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) co <- concoreg(x,y,c(3,2,4),2)
Analyzing a set of partial links between Xi and Yj, SUCCESSIVE SOLUTIONS
concorgm(x, px, y, py, r)
concorgm(x, px, y, py, r)
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
The first solution calculates 1+kx normed vectors: the vector u[:,1]
of Rp associated to the ky vectors vi[:,1]
's of Rqi,
by maximizing sum(cov((x)(u[,k]),(y_i)(v_i[,k]))^2)
, with 1+ky norm constraints on the axes.
A component (x)(u[,k])
is associated to ky partial components (yi)(vi)[,k]
and to a global component y*V[,k]
.
cov((x)(u[,k]),(y)(V[,k]))^2 = sum(cov((x)(u[,k]),(y_i)(v_i[,k]))^2)(y)(V[,k])
is a global component of the components (yi)(vi[,k])
.
The second solution is obtained from the same criterion, but after replacing each yi by .
And so on for the successive solutions 1,2,...,r. The biggest number of solutions may be r=inf(n, p, qi), when the (x')(yi')(s)
are supposed with full rank; then rmax=min(c(min(py),n,p)). For a set of r solutions, the matrix u'X'YV is diagonal and the
matrices u'X'Yjvj are triangular (good partition of the link by the solutions).
concor.m is the svdcp.m function applied to the matrix x'y.
A list
with following components:
u |
a |
v |
a |
cov2 |
a |
Lafosse, R.
Kissita, Cazes, Hanafi & Lafosse (2004) Deux methodes d'analyse factorielle du lien entre deux tableaux de variables partitionn?es. Revue de Statistique Appliqu?e, Vol 52, n. 3, 73-92.
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cg <- concorgm(x,c(2,3),y,c(3,2,4),2) cg$cov2[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cg <- concorgm(x,c(2,3),y,c(3,2,4),2) cg$cov2[1,1,]
Canonical analysis of subsets Yj with subsets Xi. Relative valuations by squared correlations of the proximities of subsets Xi with subsets Yj. SUCCESSIVE SOLUTIONS
concorgmcano(x, px, y, py, r)
concorgmcano(x, px, y, py, r)
x |
are the |
px |
The row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
For the first solution, is the optimized
criterion. The other solutions are calculated from the same criterion, but with
orthogonalities for having two by two zero correlated the canonical components defined for
each xi, and also for those defined for each yj. Each solution associates kx canonical
components to ky canonical components. When kx =1 (px=p), take
concorcano
function
This function uses the concorgm function
A list
with following components:
cx |
is a |
cy |
is a |
rho2 |
is a |
Lafosse, R.
Kissita G., Analyse canonique generalisee avec tableau de reference generalisee. Thesis, Ceremade Paris 9 Dauphine (2003).
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cc <- concorgmcano(x,c(2,3),y,c(3,2,4),2) cc$rho2[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cc <- concorgmcano(x,c(2,3),y,c(3,2,4),2) cc$rho2[1,1,]
Regression of subsets Yj by subsets Xi for comparing all the explanatory-explained pairs (Xi,Yj). SUCCESSIVE SOLUTIONS
concorgmreg(x, px, y, py, r)
concorgmreg(x, px, y, py, r)
x |
are the |
px |
A row vector which contains the numbers pi, i = 1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
For the first solution, is the optimized criterion. The second solution is
calculated from the same criterion, but with
instead of the matrices yj and with orthogonalities for having two by
two zero correlated the explanatory components defined for each matrix
xi. And so on for the other solutions. One solution k associates kx
explanatory components (in
cx[,k]
) to ky explained components. When
kx =1 (px = p), take concoreg function
This function uses the concorgm function
A list
with following components:
cx |
a |
v |
is a |
varexp |
is a kx x ky x r array; for a fixed solution k, the matrix |
Lafosse, R.
Hanafi & Lafosse (2004) Regression of a multi-set by another based on an extension of the SVD. COMPSTAT'2004 Symposium
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cr <- concorgmreg(x,c(2,3),y,c(3,2,4),2) cr$varexp[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cr <- concorgmreg(x,c(2,3),y,c(3,2,4),2) cr$varexp[1,1,]
concorgm with the set of r solutions simultaneously optimized
concors(x, px, y, py, r)
concors(x, px, y, py, r)
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
This function uses the svdbips function
A list
with following components:
u |
a |
v |
a |
cov2 |
a |
Lafosse, R.
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cs <- concors(x,c(2,3),y,c(3,2,4),2) cs$cov2[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cs <- concors(x,c(2,3),y,c(3,2,4),2) cs$cov2[1,1,]
concorgmcano with the set of r solutions simultaneously optimized
concorscano(x, px, y, py, r)
concorscano(x, px, y, py, r)
x |
are the |
px |
A row vector which contains the numbers pi, i=1,...,kx, of the kx subsets xi of x : sum(pi)=sum(px)=p. px is the partition vector of x |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions rmax <= min(min(px),min(py),n) |
This function uses the concors function
A list
with following components:
cx |
a |
cy |
a |
cov2 |
a |
Lafosse, R.
Hanafi & Lafosse (2001) Generalisation de la regression lineaire simple pour analyser la dependance de K ensembles de variables avec un K+1 eme. Revue de Statistique Appliquee vol.49, n.1
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cca <- concorscano(x,c(2,3),y,c(3,2,4),2) cca$rho2[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) cca <- concorscano(x,c(2,3),y,c(3,2,4),2) cca$rho2[1,1,]
Regression of several subsets of variables Yj by another set X. SUCCESSIVE SOLUTIONS
concorsreg(x, px, y, py, r)
concorsreg(x, px, y, py, r)
x |
are the |
px |
The row vector which contains the numbers pi, i = 1,...,kx, of the kx subsets xi of x : |
y |
See |
py |
The partition vector of y. A row vector containing the numbers |
r |
The number of wanted successive solutions |
A list
with following components:
cx |
a |
v |
is a |
varexp |
is a |
Lafosse, R.
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) crs <- concorsreg(x,c(2,3),y,c(3,2,4),2) crs$varexp[1,1,]
x <- matrix(runif(50),10,5);y <- matrix(runif(90),10,9) x <- scale(x);y <- scale(y) crs <- concorsreg(x,c(2,3),y,c(3,2,4),2) crs$varexp[1,1,]
SVD for bipartitioned matrix x. r successive Solutions
svdbip(x, K, H, r)
svdbip(x, K, H, r)
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
The first solution calculates kx+ky normed vectors: kx vectors uk[:,1]
of associated to ky vectors
vh[:,1]
's of , by
maximizing
, with kx+ky
norm constraints. A value
measures the
relative link between
and
associated to the block xkh.
The second solution is obtained from the same criterion, but after
replacing each xhk by xkh-xkhvhvh'-ukuk'xkh+ukuk'xkhvhvh'. And
so on for the successive solutions 1,2,...,r . The biggest number of
solutions may be r=inf(pk,qh), when the xkh's are supposed with full
rank; then
rmax=min([min(K),min(H)])
.
When K=p (or H=q, with t(x)), svdcp function is better. When H=q and
K=p, it is the usual svd (with squared singular values).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen.
A list
with following components:
u |
a |
v |
a |
s |
a |
Lafosse, R.
Kissita G., Cazes P., Hanafi M. & Lafosse (2004) Deux methodes d'analyse factorielle du lien entre deux tableaux de variables partitiones. Revue de Statistique Appliquee.
x <- matrix(runif(200),10,20) s <- svdbip(x,c(3,4,3),c(5,15),3)
x <- matrix(runif(200),10,20) s <- svdbip(x,c(3,4,3),c(5,15),3)
SVD for bipartitioned matrix x. r successive Solutions. As SVDBIP, but with another algorithm and another initialisation
svdbip2(x, K, H, r)
svdbip2(x, K, H, r)
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
The first solution calculates kx+ky normed vectors: kx vectors
uk[:,1]
of Rpk associated to ky vectors vh[,1]
's of Rqh, by maximizing
, with kx+ky norm
constraints. A value
measures the
relative link between
and
associated to the
block xkh.
The second solution is obtained from the same criterion, but after
replacing each xhk by xkh-xkhvhvh'-ukuk'xkh+ukuk'xkhvhvh'. And
so on for the successive solutions 1,2,...,r . The biggest number of
solutions may be r=inf(pk,qh), when the xkh's are supposed with full
rank; then
rmax=min([min(K),min(H)])
.
When K=p (or H=q, with t(x)), svdcp function is better. When H=q and
K=p, it is the usual svd (with squared singular values).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen
A list
with following components:
u |
a |
v |
a |
s |
a |
Lafosse, R.
Kissita G., Analyse canonique generalisee avec tableau de reference generalisee. Thesis, Ceremade Paris 9 Dauphine (2003)
x <- matrix(runif(200),10,20) s2 <- svdbip2(x,c(3,4,3),c(5,5,10),3);s2$s2 s1 <- svdbip(x,c(3,4,3),c(5,5,10),3);s1$s2
x <- matrix(runif(200),10,20) s2 <- svdbip2(x,c(3,4,3),c(5,5,10),3);s2$s2 s1 <- svdbip(x,c(3,4,3),c(5,5,10),3);s1$s2
SVD for bipartitioned matrix x. SIMULTANEOUS SOLUTIONS. ("simultaneous svdbip")
svdbips(x, K, H, r)
svdbips(x, K, H, r)
x |
a |
K |
is a row vector which contains the numbers pk, k=1,...,kx, of the partition of x with kx row blocks : |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
One set of r solutions is calculated by maximizing , with kx+ky orthonormality constraints (for
each uk and each vh). For each fixed r value, the solution is totally
new (does'nt consist to complete a previous calculus of one set of r-1
solutions).
rmax=min([min(K),min(H)])
. When r=1, it is svdbip (thus
it is svdcp when r=1 and kx=1).
Convergence of algorithm may be not global. So the below proposed
initialisation of the algorithm may be not very suitable for some data
sets. Several different random initialisations with normed vectors
might be considered and the best result then choosen....
A list
with following components:
u |
a |
v |
a |
s |
a |
Lafosse, R.
Lafosse R. & Ten Berge J. A simultaneous CONCOR method for the analysis of two partitioned matrices. submitted.
x <- matrix(runif(200),10,20) s1 <- svdbip(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(s1$s2))) ss <- svdbips(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(ss$s2)))
x <- matrix(runif(200),10,20) s1 <- svdbip(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(s1$s2))) ss <- svdbips(x,c(3,4,3),c(5,5,10),2);sum(sum(sum(ss$s2)))
SVD for a Column Partitioned matrix x. r global successive solutions
svdcp(x, H, r)
svdcp(x, H, r)
x |
a |
H |
is a row vector which contains the numbers qh, h=1,...,ky, of the partition of x with ky column blocks : sum(qh)=q |
r |
The number of wanted successive solutions |
The first solution calculates 1+kx normed vectors: the vector u[,1]
of
associated to the kx vectors
vi[,1]
's of . by maximizing
, with 1+kx norm constraints. A
value
measures the relative link between
and
associated to xi. It corresponds to a partial squared
singular value notion, since
,
where s is the usual first singular value of x.
The second solution is obtained from the same criterion, but after
replacing each xi by
xi-xi*vi[,1]*vi[,1]^prime
. And so on for the
successive solutions 1,2,...,r . The biggest number of solutions may
be r=inf(p,qi), when the xi's are supposed with full rank; then
rmax=min([min(H),p])
.
A list
with following components:
u |
a |
v |
a |
s |
a |
Lafosse, R.
Lafosse R. & Hanafi M.(1997) Concordance d'un tableau avec K tableaux: Definition de K+1 uples synthetiques. Revue de Statistique Appliquee vol.45,n.4.
x <- matrix(runif(200),10,20) s <- svdcp(x,c(5,5,10),1) ss <- svd(x);ss$d[1]^2 sum(s$s2)
x <- matrix(runif(200),10,20) s <- svdcp(x,c(5,5,10),1) ss <- svd(x);ss$d[1]^2 sum(s$s2)