The matrix is divided in two blocks with an equal variance using the greedy implementation of the partition problem on the covariances between the columns and the total row sums.
numeric array or matrix
The objective is to find two block with an variance that is as close as possible to the variance of the other block without significantly impacting the performance.
The first step is to calculate the covariances between all columns and the total row sums of the matrix. Using the greedy implementation of the partition problem, we find two groups with variances that are as close as possible to eachother.
numeric binary vector with the partition
Kris Boudt, firstname.lastname@example.org
Edgars Jakobsons, email@example.com
Steven Vanduffel, firstname.lastname@example.org
Kristof Verbeken, email@example.com
to test: d<-10; X<-matrix(runif(d^2,max=10),ncol=d); partition<-sample(c(T,F),d,replace=T); print(equalvar(X,partition,"greedy"));print(equalvar(X,partition,"KK"));
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.