Maximally independent variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Maximally independent variables

Gabor Grothendieck
Are there any R packages that relate to the
following data reduction problem fo finding
maximally independent variables?

Currently what I am doing is solving the following
minimax problem:  Suppose we want to find the
three maximally independent variables.  From the
full n by n correlation matrix, C, of all n variables
chooose three variables and form their 3 by 3 correlation
submatrix, C1, finding the offdiagonal entry of C1
which is largest in absolute value.  Call that z.  Thus for
each set of 3 variables we can associate such a z.
Now for each possible set of three variables find the one for
which its value of z is least.

I only give the above formulation because that is
what I am doing now but I would be happy to
consider other different formulations.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Maximally independent variables

Jacques VESLOT
library(gtools)
z <- combinations(ncol(DF), 3)
maxcor <- function(x) max(as.vector(as.dist(cor(DF[,x]))))
names(DF)[z[which.min(apply(z, 1, maxcor)),]]


Gabor Grothendieck a écrit :

>Are there any R packages that relate to the
>following data reduction problem fo finding
>maximally independent variables?
>
>Currently what I am doing is solving the following
>minimax problem:  Suppose we want to find the
>three maximally independent variables.  From the
>full n by n correlation matrix, C, of all n variables
>chooose three variables and form their 3 by 3 correlation
>submatrix, C1, finding the offdiagonal entry of C1
>which is largest in absolute value.  Call that z.  Thus for
>each set of 3 variables we can associate such a z.
>Now for each possible set of three variables find the one for
>which its value of z is least.
>
>I only give the above formulation because that is
>what I am doing now but I would be happy to
>consider other different formulations.
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>  
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Maximally independent variables

Gabor Grothendieck
That's basically what I already do but what I was wondering
was if there were any other approaches such as connections
with clustering, PCA, that have already been developed in
R that might be applicable.

On 3/1/06, Jacques VESLOT <[hidden email]> wrote:

> library(gtools)
> z <- combinations(ncol(DF), 3)
> maxcor <- function(x) max(as.vector(as.dist(cor(DF[,x]))))
> names(DF)[z[which.min(apply(z, 1, maxcor)),]]
>
>
> Gabor Grothendieck a écrit :
>
> >Are there any R packages that relate to the
> >following data reduction problem fo finding
> >maximally independent variables?
> >
> >Currently what I am doing is solving the following
> >minimax problem:  Suppose we want to find the
> >three maximally independent variables.  From the
> >full n by n correlation matrix, C, of all n variables
> >chooose three variables and form their 3 by 3 correlation
> >submatrix, C1, finding the offdiagonal entry of C1
> >which is largest in absolute value.  Call that z.  Thus for
> >each set of 3 variables we can associate such a z.
> >Now for each possible set of three variables find the one for
> >which its value of z is least.
> >
> >I only give the above formulation because that is
> >what I am doing now but I would be happy to
> >consider other different formulations.
> >
> >______________________________________________
> >[hidden email] mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> >
> >
> >
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Maximally independent variables

Gabor Grothendieck
In case others are interested I did get a reply offlist
regarding the escouf function in the pastecs package.
See:

   library(pastecs)
   ?escouf

Also see pages 47-52 of
   system.file("doc/pastecs.pdf", package = "pastecs")
(in French).

On 3/1/06, Gabor Grothendieck <[hidden email]> wrote:

> That's basically what I already do but what I was wondering
> was if there were any other approaches such as connections
> with clustering, PCA, that have already been developed in
> R that might be applicable.
>
> On 3/1/06, Jacques VESLOT <[hidden email]> wrote:
> > library(gtools)
> > z <- combinations(ncol(DF), 3)
> > maxcor <- function(x) max(as.vector(as.dist(cor(DF[,x]))))
> > names(DF)[z[which.min(apply(z, 1, maxcor)),]]
> >
> >
> > Gabor Grothendieck a écrit :
> >
> > >Are there any R packages that relate to the
> > >following data reduction problem fo finding
> > >maximally independent variables?
> > >
> > >Currently what I am doing is solving the following
> > >minimax problem:  Suppose we want to find the
> > >three maximally independent variables.  From the
> > >full n by n correlation matrix, C, of all n variables
> > >chooose three variables and form their 3 by 3 correlation
> > >submatrix, C1, finding the offdiagonal entry of C1
> > >which is largest in absolute value.  Call that z.  Thus for
> > >each set of 3 variables we can associate such a z.
> > >Now for each possible set of three variables find the one for
> > >which its value of z is least.
> > >
> > >I only give the above formulation because that is
> > >what I am doing now but I would be happy to
> > >consider other different formulations.
> > >
> > >______________________________________________
> > >[hidden email] mailing list
> > >https://stat.ethz.ch/mailman/listinfo/r-help
> > >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> > >
> > >
> > >
> >
> >
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Maximally independent variables

cberry
In reply to this post by Gabor Grothendieck
Gabor Grothendieck <ggrothendieck <at> gmail.com> writes:

>
> That's basically what I already do but what I was wondering
> was if there were any other approaches such as connections
> with clustering, PCA, that have already been developed in
> R that might be applicable.


Have you considered finding the combination with maximum generalized variance of
three scaled variables (i.e. the maximum determinant of the correlation matrix
of three variables)?

You can vectorize this calculation as follows:

z <- combinations(ncol(DF), 3)

cormat <- cor(DF)

det3 <- function(ra,rb,rc) 1 - ra*ra - rb*rb - rc*rc + 2*ra*rb*rc

res <- det3( cormat[z[,1:2]],cormat[z[,c(1,3)]],cormat[z[,c(2,3)]] )

z[which.max(res),]

>
> On 3/1/06, Jacques VESLOT <jacques.veslot <at> cirad.fr> wrote:
> > library(gtools)
> > z <- combinations(ncol(DF), 3)
> > maxcor <- function(x) max(as.vector(as.dist(cor(DF[,x]))))
> > names(DF)[z[which.min(apply(z, 1, maxcor)),]]
> >
> >
> > Gabor Grothendieck a écrit :
> >
> > >Are there any R packages that relate to the
> > >following data reduction problem fo finding
> > >maximally independent variables?
> > >

[rest deleted]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Loading...