Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
178421 1.23 2.35 2.50 2.84 2.54 2.39 0.28 0.95 1.31 8890176 139871 1.22 2.32 2.59 2.85 2.58 2.59 0.28 0.97 1.33 8194413 118159 1.21 2.36 2.56 2.80 2.55 3.48 0.26 0.97 1.32 7722000 109763 1.22 2.28 2.59 2.83 2.56 3.36 0.24 0.95 1.34 7769178 97415 1.21 2.26 2.58 2.83 2.59 3.28 0.25 0.96 1.34 7449343 119190 1.22 2.31 2.62 2.80 2.57 3.41 0.26 0.96 1.28 7929370 97903 1.21 2.28 2.59 2.77 2.60 3.46 0.27 0.94 1.33 7473017 96953 1.20 2.20 2.58 2.75 2.57 3.38 0.26 0.96 1.33 7472424 87888 1.18 2.24 2.57 2.80 2.48 3.18 0.28 0.98 1.37 7292436 84637 1.19 2.33 2.57 2.85 2.51 3.47 0.27 0.97 1.37 7215340 90549 1.20 2.36 2.55 2.90 2.45 3.05 0.29 0.96 1.33 7216230 95680 1.19 2.23 2.51 2.79 2.47 3.37 0.28 0.95 1.32 7378041 99371 1.19 2.31 2.50 2.71 2.52 3.25 0.26 0.96 1.36 7877412 79984 1.20 2.27 2.59 2.79 2.50 3.30 0.29 0.96 1.37 7158125 86752 1.21 2.28 2.63 2.86 2.61 3.49 0.29 0.97 1.37 7137912 85733 1.20 2.31 2.63 2.95 2.60 3.55 0.26 0.96 1.38 7290803 84906 1.20 2.43 2.61 3.09 2.53 3.40 0.26 0.95 1.36 7425266 78356 1.20 2.46 2.64 3.15 2.53 3.11 0.26 0.95 1.35 7450430 108895 1.21 2.48 2.67 3.23 2.53 2.71 0.29 0.94 1.32 9214042 101768 1.21 2.45 2.63 3.13 2.53 2.71 0.30 0.94 1.31 8158864 73285 1.21 2.44 2.58 3.03 2.56 3.71 0.27 0.98 1.35 6515759 65724 1.20 2.36 2.56 2.88 2.68 3.74 0.27 0.93 1.34 6308487 67457 1.21 2.34 2.57 2.84 2.74 3.57 0.27 0.93 1.33 6366367 67203 1.21 2.16 2.55 2.85 2.75 3.32 0.28 0.96 1.34 6770097 69273 1.21 2.23 2.58 2.83 2.74 3.46 0.28 0.97 1.31 6700697 80807 1.20 2.16 2.50 2.82 2.75 3.51 0.28 0.97 1.30 7140792 75129 1.19 2.20 2.56 2.81 2.76 3.41 0.28 0.95 1.32 6891715 74991 1.20 2.26 2.62 2.75 2.78 3.56 0.28 0.95 1.33 7057521 68157 1.20 2.23 2.71 2.78 2.76 3.32 0.27 0.96 1.33 6806593 73858 1.20 2.32 2.74 2.80 2.75 3.47 0.28 0.98 1.33 7068776 71349 1.22 2.34 2.76 2.82 2.76 3.54 0.28 0.98 1.33 6868085 85634 1.22 2.33 2.66 2.86 2.73 3.19 0.28 0.97 1.34 7245015 91624 1.21 2.30 2.61 2.86 2.75 3.44 0.26 0.98 1.37 7160726 116014 1.25 2.32 2.68 2.84 2.78 3.54 0.26 0.98 1.33 7927365 120033 1.25 2.31 2.70 2.82 2.72 3.52 0.27 0.99 1.33 8275238 108651 1.27 2.32 2.70 2.83 2.69 3.10 0.25 0.99 1.34 7510220 105378 1.28 2.32 2.72 2.82 2.75 3.46 0.25 0.97 1.31 7751398 138939 1.27 2.30 2.77 2.85 2.79 3.24 0.23 0.98 1.31 8701633 132974 1.28 2.33 2.76 2.83 2.77 3.25 0.25 0.97 1.32 8164755 135277 1.29 2.34 2.72 2.82 2.77 3.60 0.25 0.97 1.36 8534307 152741 1.26 2.32 2.69 2.79 2.78 3.50 0.26 0.97 1.40 8333017 158417 1.27 2.32 2.70 2.76 2.78 2.99 0.24 0.98 1.40 8568251 157460 1.25 2.32 2.69 2.76 2.80 2.99 0.23 0.97 1.40 8613013 193997 1.27 2.33 2.66 2.79 2.79 3.07 0.24 0.97 1.40 9139357 154089 1.27 2.36 2.74 2.82 2.78 3.06 0.23 0.98 1.38 8385716 147570 1.27 2.37 2.76 2.81 2.76 2.98 0.24 0.98 1.36 8451237 162924 1.29 2.35 2.79 2.77 2.76 2.98 0.24 0.95 1.37 9033401 153629 1.26 2.28 2.78 2.78 2.77 2.53 0.23 0.97 1.37 8565930 155907 1.27 2.21 2.80 2.83 2.77 2.25 0.22 0.97 1.38 8562307 197675 1.27 2.26 2.78 2.83 2.70 2.43 0.23 0.97 1.38 9255216 250708 1.28 2.32 2.76 2.83 2.70 2.59 0.24 0.97 1.37 10502760 266652 1.28 2.33 2.73 2.79 2.68 2.21 0.24 0.98 1.38 10855161 209842 1.28 2.36 2.72 2.79 2.72 2.35 0.24 0.98 1.39 9473338 165826 1.27 2.36 2.73 2.77 2.74 2.40 0.25 0.98 1.36 8521439 137152 1.24 2.35 2.74 2.78 2.75 3.80 0.22 0.96 1.40 8169912 150581 1.25 2.34 2.72 2.79 2.75 3.53 0.22 0.98 1.40 8705590 145973 1.25 2.32 2.71 2.80 2.77 3.40 0.22 1.00 1.41 8600302 126532 1.24 2.27 2.66 2.77 2.77 3.65 0.22 1.01 1.40 7884570 115437 1.24 2.30 2.68 2.74 2.75 3.54 0.22 1.02 1.39 7509946 119526 1.23 2.29 2.67 2.77 2.76 3.55 0.22 1.01 1.38 7796000 110856 1.24 2.30 2.68 2.74 2.74 3.83 0.23 1.01 1.41 7651158 97243 1.23 2.30 2.67 2.81 2.73 3.82 0.22 1.02 1.41 7430052 103876 1.24 2.36 2.71 2.76 2.75 3.58 0.23 1.01 1.40 7581024 116370 1.24 2.35 2.69 2.87 2.73 3.69 0.20 1.01 1.39 8431470 109616 1.24 2.35 2.64 2.86 2.71 3.45 0.20 1.01 1.40 7903994 98365 1.25 2.30 2.66 2.84 2.70 3.38 0.21 1.02 1.42 7462642 90440 1.26 2.24 2.70 2.87 2.74 3.25 0.22 1.02 1.41 7424743 88899 1.26 2.22 2.69 2.93 2.73 3.63 0.23 1.02 1.39 7480504 92358 1.27 2.27 2.71 3.00 2.74 3.55 0.22 1.01 1.38 7863944 88394 1.26 2.37 2.74 3.03 2.73 3.46 0.23 1.01 1.38 7703698 98219 1.28 2.38 2.78 3.12 2.74 3.01 0.27 0.99 1.36 8508132 113546 1.29 2.41 2.79 3.20 2.75 3.09 0.26 1.00 1.36 8933008 107168 1.28 2.37 2.75 3.07 2.79 3.77 0.23 1.01 1.41 8491850 77540 1.27 2.37 2.69 2.93 2.80 3.84 0.23 0.99 1.40 6940275 74944 1.30 2.36 2.69 2.86 2.80 3.71 0.23 1.00 1.39 6917191 75641 1.30 2.30 2.69 2.84 2.78 3.72 0.22 1.02 1.40 7096722 75910 1.28 2.18 2.72 2.82 2.77 3.49 0.21 1.01 1.41 7105114 87384 1.29 2.22 2.69 2.84 2.78 3.64 0.21 1.01 1.42 7647797 84615 1.27 2.24 2.70 2.88 2.81 3.52 0.21 1.01 1.44 7440408 80420 1.26 2.17 2.68 2.83 2.72 3.21 0.22 1.03 1.43 7255613 80784 1.27 2.23 2.70 2.84 2.66 3.49 0.21 1.02 1.43 7231703 79933 1.27 2.27 2.72 2.87 2.72 3.50 0.20 1.02 1.42 7278022 82118 1.27 2.25 2.70 2.90 2.74 3.61 0.20 1.03 1.39 7382680 91420 1.28 2.25 2.66 2.87 2.77 3.48 0.21 1.03 1.38 7622740 112426 1.29 2.27 2.68 2.92 2.79 3.72 0.21 1.02 1.36 8295038 114528 1.28 2.28 2.65 2.89 2.84 3.13 0.20 1.02 1.37 8136158 131025 1.30 2.32 2.69 2.90 2.84 3.12 0.20 1.02 1.38 8240817 116460 1.30 2.33 2.66 2.85 2.86 3.37 0.21 1.02 1.36 7993962 111258 1.30 2.30 2.69 2.82 2.86 3.36 0.19 1.03 1.37 7997958 155318 1.29 2.30 2.69 2.85 2.89 3.39 0.20 1.02 1.34 8914911 155078 1.30 2.20 2.65 2.86 2.89 3.53 0.21 1.02 1.38 9082346 134794 1.29 2.15 2.66 2.88 2.80 3.21 0.22 1.02 1.36 8690947 139985 1.28 2.15 2.63 2.86 2.87 3.05 0.20 1.03 1.36 8678669 198778 1.30 2.13 2.65 2.83 2.89 3.11 0.20 1.02 1.36 9768461 172436 1.30 2.12 2.60 2.84 2.91 3.18 0.21 1.02 1.37 8751448 169585 1.31 2.17 2.57 2.86 2.90 2.87 0.20 1.02 1.37 8737854 203702 1.32 2.20 2.65 2.85 2.90 2.89 0.20 1.02 1.37 9684075 282392 1.33 2.21 2.69 2.86 2.90 2.81 0.21 1.02 1.38 11529582 220658 1.32 2.28 2.71 2.89 2.76 2.89 0.21 1.00 1.41 9854882 194472 1.30 2.32 2.72 2.87 2.71 2.82 0.20 1.04 1.46 9030507 269246 1.31 2.32 2.73 2.84 2.74 2.64 0.21 1.04 1.44 10656814 215340 1.30 2.33 2.72 2.79 2.79 2.55 0.21 1.03 1.43 9111428 218319 1.30 2.32 2.73 2.86 2.85 2.54 0.20 1.02 1.43 9642906 195724 1.30 2.31 2.72 2.86 2.87 2.46 0.20 1.04 1.46 9217060 174614 1.29 2.33 2.70 2.87 2.89 2.59 0.19 1.05 1.45 8816389 172085 1.29 2.31 2.72 2.85 2.90 2.68 0.19 1.03 1.41 9074790 152347 1.30 2.19 2.70 2.88 2.90 3.33 0.20 0.99 1.42 8601172 189615 1.30 2.13 2.72 2.88 2.88 3.41 0.18 1.03 1.41 9735782 173804 1.29 2.15 2.70 2.87 2.91 3.30 0.18 1.08 1.42 9222117 145683 1.27 2.25 2.65 2.86 2.90 3.51 0.19 1.09 1.41 8197462 133550 1.26 2.29 2.66 2.85 2.91 3.50 0.20 1.08 1.39 8161117 121156 1.25 2.29 2.69 2.81 2.91 3.46 0.21 1.05 1.40 8085780 112040 1.26 2.29 2.70 2.81 2.91 3.36 0.21 1.06 1.40 7777563 120767 1.27 2.32 2.71 2.83 2.90 3.52 0.21 1.04 1.42 8192525 127019 1.26 2.32 2.69 2.93 2.91 3.48 0.21 1.06 1.41 8222640 136295 1.25 2.34 2.72 2.88 2.89 3.17 0.20 1.06 1.40 8852425 113425 1.25 2.32 2.71 2.86 2.88 3.08 0.20 1.07 1.42 8047626 107815 1.25 2.16 2.71 2.86 2.90 3.32 0.22 1.08 1.42 8079925 100298 1.26 1.88 2.74 2.90 2.90 3.51 0.20 1.08 1.40 8099820 97048 1.26 2.02 2.82 2.96 2.90 3.57 0.21 1.05 1.38 7444464 98750 1.26 2.07 2.76 3.02 2.90 3.67 0.22 1.04 1.40 8060967 98235 1.27 2.22 2.77 3.15 2.90 0.85 0.21 1.04 1.36 7904184 101254 1.28 2.40 2.77 3.21 2.91 2.97 0.24 1.04 1.32 8532755 139589 1.29 2.47 2.81 3.30 2.91 2.88 0.26 1.04 1.31 10077590 134921 1.30 2.43 2.77 3.14 2.90 2.99 0.24 1.06 1.34 9163186 80355 1.26 2.39 2.76 2.99 2.91 3.48 0.22 1.08 1.44 7027349 80396 1.25 2.39 2.73 2.97 2.83 3.57 0.21 1.08 1.46 7000371 82183 1.26 2.39 2.72 2.98 2.76 3.54 0.21 1.08 1.45 7234027 79709 1.25 2.36 2.73 2.95 2.84 3.67 0.21 1.07 1.47 7166769 90781 1.24 2.32 2.71 2.92 2.88 3.50 0.21 1.06 1.49 7538708
Names of X columns:
QBEFRU PBEPIL PBEABD PBEFRU PBEREG PCHEXO PAMMOGRA PAMMULTI PSOCOLA PICET BUDBEER
Endogenous Variable (Column Number)
Categorization
none
quantiles
hclust
equal
Number of categories (only if categorization<>none)
Cross-Validation? (only if categorization<>none)
no
yes
Chart options
R Code
library(party) library(Hmisc) par1 <- as.numeric(par1) par3 <- as.numeric(par3) x <- data.frame(t(y)) is.data.frame(x) x <- x[!is.na(x[,par1]),] k <- length(x[1,]) n <- length(x[,1]) colnames(x)[par1] x[,par1] if (par2 == 'kmeans') { cl <- kmeans(x[,par1], par3) print(cl) clm <- matrix(cbind(cl$centers,1:par3),ncol=2) clm <- clm[sort.list(clm[,1]),] for (i in 1:par3) { cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='') } cl$cluster <- as.factor(cl$cluster) print(cl$cluster) x[,par1] <- cl$cluster } if (par2 == 'quantiles') { x[,par1] <- cut2(x[,par1],g=par3) } if (par2 == 'hclust') { hc <- hclust(dist(x[,par1])^2, 'cen') print(hc) memb <- cutree(hc, k = par3) dum <- c(mean(x[memb==1,par1])) for (i in 2:par3) { dum <- c(dum, mean(x[memb==i,par1])) } hcm <- matrix(cbind(dum,1:par3),ncol=2) hcm <- hcm[sort.list(hcm[,1]),] for (i in 1:par3) { memb[memb==hcm[i,2]] <- paste('C',i,sep='') } memb <- as.factor(memb) print(memb) x[,par1] <- memb } if (par2=='equal') { ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep='')) x[,par1] <- as.factor(ed) } table(x[,par1]) colnames(x) colnames(x)[par1] x[,par1] if (par2 == 'none') { m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) } load(file='createtable') if (par2 != 'none') { m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) if (par4=='yes') { a<-table.start() a<-table.row.start(a) a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'',1,TRUE) a<-table.element(a,'Prediction (training)',par3+1,TRUE) a<-table.element(a,'Prediction (testing)',par3+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Actual',1,TRUE) for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) a<-table.element(a,'CV',1,TRUE) for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) a<-table.element(a,'CV',1,TRUE) a<-table.row.end(a) for (i in 1:10) { ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) if (i==1) { m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) m.ct.i.actu <- x[ind==1,par1] m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) m.ct.x.actu <- x[ind==2,par1] } else { m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) } } print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) numer <- 0 for (i in 1:par3) { print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) numer <- numer + m.ct.i.tab[i,i] } print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) numer <- 0 for (i in 1:par3) { print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) numer <- numer + m.ct.x.tab[i,i] } print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) for (i in 1:par3) { a<-table.row.start(a) a<-table.element(a,paste('C',i,sep=''),1,TRUE) for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) a<-table.row.end(a) } a<-table.row.start(a) a<-table.element(a,'Overall',1,TRUE) for (jjj in 1:par3) a<-table.element(a,'-') a<-table.element(a,round(m.ct.i.cp,4)) for (jjj in 1:par3) a<-table.element(a,'-') a<-table.element(a,round(m.ct.x.cp,4)) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') } } m bitmap(file='test1.png') plot(m) dev.off() bitmap(file='test1a.png') plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') dev.off() if (par2 == 'none') { forec <- predict(m) result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) colnames(result) <- c('Actuals','Forecasts','Residuals') print(result) } if (par2 != 'none') { print(cbind(as.factor(x[,par1]),predict(m))) myt <- table(as.factor(x[,par1]),predict(m)) print(myt) } bitmap(file='test2.png') if(par2=='none') { op <- par(mfrow=c(2,2)) plot(density(result$Actuals),main='Kernel Density Plot of Actuals') plot(density(result$Residuals),main='Kernel Density Plot of Residuals') plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') par(op) } if(par2!='none') { plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') } dev.off() if (par2 == 'none') { detcoef <- cor(result$Forecasts,result$Actuals) a<-table.start() a<-table.row.start(a) a<-table.element(a,'Goodness of Fit',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Correlation',1,TRUE) a<-table.element(a,round(detcoef,4)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'R-squared',1,TRUE) a<-table.element(a,round(detcoef*detcoef,4)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'RMSE',1,TRUE) a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'#',header=TRUE) a<-table.element(a,'Actuals',header=TRUE) a<-table.element(a,'Forecasts',header=TRUE) a<-table.element(a,'Residuals',header=TRUE) a<-table.row.end(a) for (i in 1:length(result$Actuals)) { a<-table.row.start(a) a<-table.element(a,i,header=TRUE) a<-table.element(a,result$Actuals[i]) a<-table.element(a,result$Forecasts[i]) a<-table.element(a,result$Residuals[i]) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable.tab') } if (par2 != 'none') { a<-table.start() a<-table.row.start(a) a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'',1,TRUE) for (i in 1:par3) { a<-table.element(a,paste('C',i,sep=''),1,TRUE) } a<-table.row.end(a) for (i in 1:par3) { a<-table.row.start(a) a<-table.element(a,paste('C',i,sep=''),1,TRUE) for (j in 1:par3) { a<-table.element(a,myt[i,j]) } a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable2.tab') }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation