## 'var.lower' and 'var.upper' are the variance selection range
var.lower<-0.05
var.upper<-0.07
## 'xy.cor' is the correlation selection range
xy.cor<-0.3
## 'tst' is the number of test set
tst<-c(72:101)
data(activity)
data(descriptor)
data(deleted_descriptor)
tr.tst<-VarCor(tst,activity,descriptor,deleted_descriptor,var.lower,var.upper,xy.cor)
## the variance distribution of the original dataset
plotvar(tr.tst[[3]],tr.tst[[1]])
## the variance distribution of the dataset with variance and correlation selection
plotvar(tr.tst[[4]],tr.tst[[1]])
## the correlation distribution of the original dataset
plotcor(tr.tst[[4]],tr.tst[[1]])
## the correlation distribution of the dataset with variance and correlation selection
plotcor(tr.tst[[4]],tr.tst[[1]])
xtr<-as.data.frame(tr.tst[[4]])
ytr<-as.data.frame(tr.tst[[1]])
xtst<-as.data.frame(tr.tst[[5]])
ytst<-as.data.frame(tr.tst[[2]])
## variables clustering
tree<-hclustvar(xtr)
Clusterth.SIze2<-stepMLRMPA(tree,2,5,op1="statistic_parameters02.txt",op2="model02.txt",tr.tst)
Clusterth.SIze3<-stepMLRMPA(tree,3,5,op1="statistic_parameters03.txt",op2="model03.txt",tr.tst)
Run the code above in your browser using DataLab