====== BM2 clustering with relational constraints ====== [[pro:bm2|BM2 book]], notes:net: [[notes:net:bima&#example_2]], [[notes:net:jocr#read_clustering_in_r]] notes:clu: [[notes:clu:cluster]], [[notes:clu:counties]]: [[notes:clu:counties:pajek]], [[notes:clu:counties:clu]] C:\Users\batagelj\work\Python\WoS\BM\results\cluster > source("C:\\Users\\batagelj\\work\\Python\\WoS\\BM\\results\\cluster\\Pajek2R.R") > source("C:\\Users\\batagelj\\work\\Python\\WoS\\BM\\results\\cluster\\varCutTree.R") > > getwd() [1] "C:/Users/batagelj/work/Python/WoS/BM/test2" > setwd("C:/Users/batagelj/work/Python/WoS/BM/results/Acite") > > G <- read.csv("AcitedMain.net",sep=" ",header=FALSE,skip=1,nrows=3012) > nam <- as.character(G[[2]]) > head(nam) [1] "PADGETT_J" "KNUTH_D" "BAKER_W" "YOSHIDA_M" "LEE_D" "EVANS_E" > > source("C:\\Users\\batagelj\\work\\Python\\WoS\\BM\\results\\cluster\\Pajek2R.R") > source("C:\\Users\\batagelj\\work\\Python\\WoS\\BM\\results\\cluster\\varCutTree.R") > getwd() [1] "C:/Users/batagelj/work/Python/WoS/BM/test2" > setwd("C:/Users/batagelj/work/Python/WoS/BM/results/Acite") > n <- 3012; nm <- n-1 > RT <- Pajek2R("tolerant.clu") > HT <- read.csv("TolerantHeig.vec",header=FALSE,skip=n+1)[[1]] > RT$height <- HT > RT$method <- "Maximum/Tolerant" > RT$dist.method <- "Pajek AWWA" > RT$order <- orDendro(RT$merge,nm) > plot(RT,hang=-1,cex=0.08,main="Maximum/Tolerant",lwd=0.01) > pdf("DendroMaxTol.pdf",width=58.5,height=41.5) > plot(RT,hang=-1,cex=0.08,main="Maximum/Tolerant",lwd=0.01) > dev.off()