Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1418 56 79 30 146283 1 210907 869 56 58 28 98364 1 120982 1530 54 60 38 86146 1 176508 2172 89 108 30 96933 1 179321 901 40 49 22 79234 1 123185 463 25 0 26 42551 1 52746 3201 92 121 25 195663 1 385534 371 18 1 18 6853 1 33170 1192 63 20 11 21529 0 101645 1583 44 43 26 95757 1 149061 1439 33 69 25 85584 1 165446 1764 84 78 38 143983 1 237213 1495 88 86 44 75851 1 173326 1373 55 44 30 59238 1 133131 2187 60 104 40 93163 1 258873 1491 66 63 34 96037 1 180083 4041 154 158 47 151511 1 324799 1706 53 102 30 136368 1 230964 2152 119 77 31 112642 1 236785 1036 41 82 23 94728 1 135473 1882 61 115 36 105499 1 202925 1929 58 101 36 121527 1 215147 2242 75 80 30 127766 1 344297 1220 33 50 25 98958 1 153935 1289 40 83 39 77900 1 132943 2515 92 123 34 85646 1 174724 2147 100 73 31 98579 1 174415 2352 112 81 31 130767 1 225548 1638 73 105 33 131741 1 223632 1222 40 47 25 53907 1 124817 1812 45 105 33 178812 1 221698 1677 60 94 35 146761 1 210767 1579 62 44 42 82036 1 170266 1731 75 114 43 163253 1 260561 807 31 38 30 27032 1 84853 2452 77 107 33 171975 1 294424 829 34 30 13 65990 0 101011 1940 46 71 32 86572 1 215641 2662 99 84 36 159676 1 325107 186 17 0 0 1929 0 7176 1499 66 59 28 85371 1 167542 865 30 33 14 58391 1 106408 1793 76 42 17 31580 0 96560 2527 146 96 32 136815 1 265769 2747 67 106 30 120642 1 269651 1324 56 56 35 69107 1 149112 2702 107 57 20 50495 0 175824 1383 58 59 28 108016 1 152871 1179 34 39 28 46341 1 111665 2099 61 34 39 78348 1 116408 4308 119 76 34 79336 1 362301 918 42 20 26 56968 1 78800 1831 66 91 39 93176 1 183167 3373 89 115 39 161632 1 277965 1713 44 85 33 87850 1 150629 1438 66 76 28 127969 1 168809 496 24 8 4 15049 1 24188 2253 259 79 39 155135 1 329267 744 17 21 18 25109 1 65029 1161 64 30 14 45824 1 101097 2352 41 76 29 102996 1 218946 2144 68 101 44 160604 1 244052 4691 168 94 21 158051 0 341570 1112 43 27 16 44547 0 103597 2694 132 92 28 162647 1 233328 1973 105 123 35 174141 1 256462 1769 71 75 28 60622 1 206161 3148 112 128 38 179566 1 311473 2474 94 105 23 184301 1 235800 2084 82 55 36 75661 1 177939 1954 70 56 32 96144 1 207176 1226 57 41 29 129847 1 196553 1389 53 72 25 117286 1 174184 1496 103 67 27 71180 1 143246 2269 121 75 36 109377 1 187559 1833 62 114 28 85298 1 187681 1268 52 118 23 73631 1 119016 1943 52 77 40 86767 1 182192 893 32 22 23 23824 1 73566 1762 62 66 40 93487 1 194979 1403 45 69 28 82981 1 167488 1425 46 105 34 73815 1 143756 1857 63 116 33 94552 1 275541 1840 75 88 28 132190 1 243199 1502 88 73 34 128754 1 182999 1441 46 99 30 66363 1 135649 1420 53 62 33 67808 1 152299 1416 37 53 22 61724 1 120221 2970 90 118 38 131722 1 346485 1317 63 30 26 68580 1 145790 1644 78 100 35 106175 1 193339 870 25 49 8 55792 1 80953 1654 45 24 24 25157 1 122774 1054 46 67 29 76669 1 130585 937 41 46 20 57283 0 112611 3004 144 57 29 105805 1 286468 2008 82 75 45 129484 1 241066 2547 91 135 37 72413 1 148446 1885 71 68 33 87831 1 204713 1626 63 124 33 96971 1 182079 1468 53 33 25 71299 1 140344 2445 62 98 32 77494 1 220516 1964 63 58 29 120336 1 243060 1381 32 68 28 93913 1 162765 1369 39 81 28 136048 1 182613 1659 62 131 31 181248 1 232138 2888 117 110 52 146123 1 265318 1290 34 37 21 32036 0 85574 2845 92 130 24 186646 1 310839 1982 93 93 41 102255 1 225060 1904 54 118 33 168237 1 232317 1391 144 39 32 64219 1 144966 602 14 13 19 19630 1 43287 1743 61 74 20 76825 1 155754 1559 109 81 31 115338 1 164709 2014 38 109 31 109427 1 201940 2143 73 151 32 118168 1 235454 2146 75 51 18 84845 0 220801 874 50 28 23 153197 1 99466 1590 61 40 17 29877 0 92661 1590 55 56 20 63506 0 133328 1210 77 27 12 22445 0 61361 2072 75 37 17 47695 0 125930 1281 72 83 30 68370 1 100750 1401 50 54 31 146304 1 224549 834 32 27 10 38233 0 82316 1105 53 28 13 42071 0 102010 1272 42 59 22 50517 0 101523 1944 71 133 42 103950 1 243511 391 10 12 1 5841 1 22938 761 35 0 9 2341 0 41566 1605 65 106 32 84396 1 152474 530 25 23 11 24610 1 61857 1988 66 44 25 35753 0 99923 1386 41 71 36 55515 1 132487 2395 86 116 31 209056 1 317394 387 16 4 0 6622 1 21054 1742 42 62 24 115814 1 209641 620 19 12 13 11609 0 22648 449 19 18 8 13155 1 31414 800 45 14 13 18274 0 46698 1684 65 60 19 72875 0 131698 1050 35 7 18 10112 0 91735 2699 95 98 33 142775 1 244749 1606 49 64 40 68847 1 184510 1502 37 29 22 17659 0 79863 1204 64 32 38 20112 1 128423 1138 38 25 24 61023 1 97839 568 34 16 8 13983 1 38214 1459 32 48 35 65176 1 151101 2158 65 100 43 132432 1 272458 1111 52 46 43 112494 1 172494 1421 62 45 14 45109 0 108043 2833 65 129 41 170875 1 328107 1955 83 130 38 180759 1 250579 2922 95 136 45 214921 1 351067 1002 29 59 31 100226 1 158015 1060 18 25 13 32043 0 98866 956 33 32 28 54454 1 85439 2186 247 63 31 78876 1 229242 3604 139 95 40 170745 1 351619 1035 29 14 30 6940 1 84207 1417 118 36 16 49025 0 120445 3261 110 113 37 122037 1 324598 1587 67 47 30 53782 1 131069 1424 42 92 35 127748 1 204271 1701 65 70 32 86839 1 165543 1249 94 19 27 44830 1 141722 946 64 50 20 77395 0 116048 1926 81 41 18 89324 0 250047 3352 95 91 31 103300 1 299775 1641 67 111 31 112283 1 195838 2035 63 41 21 10901 1 173260 2312 83 120 39 120691 1 254488 1369 45 135 41 58106 1 104389 1577 30 27 13 57140 0 136084 2201 70 87 32 122422 1 199476 961 32 25 18 25899 0 92499 1900 83 131 39 139296 1 224330 1254 31 45 14 52678 0 135781 1335 67 29 7 23853 0 74408 1597 66 58 17 17306 0 81240 207 10 4 0 7953 1 14688 1645 70 47 30 89455 1 181633 2429 103 109 37 147866 1 271856 151 5 7 0 4245 1 7199 474 20 12 5 21509 1 46660 141 5 0 1 7670 1 17547 1639 36 37 16 66675 0 133368 872 34 37 32 14336 1 95227 1318 48 46 24 53608 1 152601 1018 40 15 17 30059 0 98146 1383 43 42 11 29668 0 79619 1314 31 7 24 22097 0 59194 1335 42 54 22 96841 0 139942 1403 46 54 12 41907 0 118612 910 33 14 19 27080 0 72880 616 18 16 13 35885 0 65475 1407 55 33 17 41247 0 99643 771 35 32 15 28313 0 71965 766 59 21 16 36845 0 77272 473 19 15 24 16548 0 49289 1376 66 38 15 36134 0 135131 1232 60 22 17 55764 0 108446 1521 36 28 18 28910 0 89746 572 25 10 20 13339 0 44296 1059 47 31 16 25319 0 77648 1544 54 32 16 66956 0 181528 1230 53 32 18 47487 0 134019 1206 40 43 22 52785 0 124064 1205 40 27 8 44683 0 92630 1255 39 37 17 35619 0 121848 613 14 20 18 21920 0 52915 721 45 32 16 45608 0 81872 1109 36 0 23 7721 0 58981 740 28 5 22 20634 0 53515 1126 44 26 13 29788 0 60812 728 30 10 13 31931 0 56375 689 22 27 16 37754 0 65490 592 17 11 16 32505 0 80949 995 31 29 20 40557 0 76302 1613 55 25 22 94238 0 104011 2048 54 55 17 44197 0 98104 705 21 23 18 43228 0 67989 301 14 5 17 4103 0 30989 1803 81 43 12 44144 0 135458 799 35 23 7 32868 0 73504 861 43 34 17 27640 0 63123 1186 46 36 14 14063 0 61254 1451 30 35 23 28990 0 74914 628 23 0 17 4694 0 31774 1161 38 37 14 42648 0 81437 1463 54 28 15 64329 0 87186 742 20 16 17 21928 0 50090 979 53 26 21 25836 0 65745 675 45 38 18 22779 0 56653 1241 39 23 18 40820 0 158399 676 20 22 17 27530 0 46455 1049 24 30 17 32378 0 73624 620 31 16 16 10824 0 38395 1081 35 18 15 39613 0 91899 1688 151 28 21 60865 0 139526 736 52 32 16 19787 0 52164 617 30 21 14 20107 0 51567 812 31 23 15 36605 0 70551 1051 29 29 17 40961 0 84856 1656 57 50 15 48231 0 102538 705 40 12 15 39725 0 86678 945 44 21 10 21455 0 85709 554 25 18 6 23430 0 34662 1597 77 27 22 62991 0 150580 982 35 41 21 49363 0 99611 222 11 13 1 9604 0 19349 1212 63 12 18 24552 0 99373 1143 44 21 17 31493 0 86230 435 19 8 4 3439 0 30837 532 13 26 10 19555 0 31706 882 42 27 16 21228 0 89806 608 38 13 16 23177 0 62088 459 29 16 9 22094 0 40151 578 20 2 16 2342 0 27634 826 27 42 17 38798 0 76990 509 20 5 7 3255 0 37460 717 19 37 15 24261 0 54157 637 37 17 14 18511 0 49862 857 26 38 14 40798 0 84337 830 42 37 18 28893 0 64175 652 49 29 12 21425 0 59382 707 30 32 16 50276 0 119308 954 49 35 21 37643 0 76702 1461 67 17 19 30377 0 103425 672 28 20 16 27126 0 70344 778 19 7 1 13 0 43410 1141 49 46 16 42097 0 104838 680 27 24 10 24451 0 62215 1090 30 40 19 14335 0 69304 616 22 3 12 5084 0 53117 285 12 10 2 9927 0 19764 1145 31 37 14 43527 0 86680 733 20 17 17 27184 0 84105 888 20 28 19 21610 0 77945 849 39 19 14 20484 0 89113 1182 29 29 11 20156 0 91005 528 16 8 4 6012 0 40248 642 27 10 16 18475 0 64187 947 21 15 20 12645 0 50857 819 19 15 12 11017 0 56613 757 35 28 15 37623 0 62792 894 14 17 16 35873 0 72535
Names of X columns:
Pageviews Logins Blogs Reviews Compendium_Hours Pop Tijd_RFC
Endogenous Variable (Column Number)
Categorization
none
none
quantiles
hclust
equal
Number of categories (only if categorization<>none)
Cross-Validation? (only if categorization<>none)
no
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
2 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation