-
Notifications
You must be signed in to change notification settings - Fork 0
prob_distr
Daria-Maltseva edited this page Jul 23, 2020
·
2 revisions
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/BatMal2012")
YN <- read.csv("./yearBM.clu",header=FALSE,skip=1)$V1
tn <- table(YN)
xn <- as.numeric(names(tn))
yn <- as.vector(tn)
zn <- yn/sum(yn)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/LietzSN")
YR <- read.csv("./yearL.clu",header=FALSE,skip=2)$V1
tr <- table(YR)
xr <- as.numeric(names(tr))
yr <- as.vector(tr)
zr <- yr/sum(yr)
# plot frequencies
plot(xn,yn,xlim=c(1960,2012),pch=16,col='red')
points(xr,yr,pch=16,col='blue')
# plot probabilities
plot(xn,zn,xlim=c(1960,2012),log='y',pch=16,col='red', main = "Works per years - Probability distributions", xlab='year',ylab='prob')
points(xr,zr,pch=16,col='blue')
legend("topleft",
legend = c("SNA", "SNS"),
col = c('red', 'blue'),
pch = c(16,16),
bty = "n",
pt.cex = 2,
cex = 1,
text.col = "black",
horiz = F ,
#inset = c(0.1, 0.1)
)
YearsProbN
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WAbm")
YN <- read.csv("./WAbm_indegree.vec",header=FALSE,skip=1)$V1
tn <- table(YN)
xn <- as.numeric(names(tn))
yn <- as.vector(tn)
zn <- yn/sum(yn)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WAl")
YR <- read.csv("./WAl_Indegree.vec",header=FALSE,skip=1)$V1
tr <- table(YR)
xr <- as.numeric(names(tr))
yr <- as.vector(tr)
zr <- yr/sum(yr)
# plot frequencies
plot(xn,yn,pch=16,log='xy', col='red')
points(xr,yr,pch=16,col='blue')
# plot probabilities
plot(xn,zn,log='xy',pch=16,col='red', main = "WA Indegree - Probability distributions", xlab='freq',ylab='prob')
points(xr,zr,pch=16,col='blue')
legend("topright",
legend = c("SNA", "SNS"),
col = c('red', 'blue'),
pch = c(16,16),
bty = "n",
pt.cex = 2,
cex = 1,
text.col = "black",
horiz = F ,
#inset = c(0.1, 0.1)
)
WAindProbN
Note different order of datasets (because SNS dataset have larger values)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WAl")
YN <- read.csv("./WAl_Outdegree.vec",header=FALSE,skip=1)$V1
tn <- table(YN)
xn <- as.numeric(names(tn))
yn <- as.vector(tn)
zn <- yn/sum(yn)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WAbm")
YR <- read.csv("./WAbm_Outdegree.vec",header=FALSE,skip=1)$V1
tr <- table(YR)
xr <- as.numeric(names(tr))
yr <- as.vector(tr)
zr <- yr/sum(yr)
# plot frequencies
plot(xn,yn,pch=16,log='xy', col='blue')
points(xr,yr,pch=16,col='red')
# plot probabilities
plot(xn,zn,log='xy',pch=16,col='blue', main = "WA Outdegree - Probability distributions", xlab='freq',ylab='prob')
points(xr,zr,pch=16,col='red')
legend("topright",
legend = c("SNS", "SNA"),
col = c('blue', 'red'),
pch = c(16,16),
bty = "n",
pt.cex = 2,
cex = 0.9,
text.col = "black",
horiz = F ,
#inset = c(0.1, 0.1)
)
WAoutdegProbN
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WKbm")
YN <- read.csv("./WKbm_indegree.vec",header=FALSE,skip=1)$V1
tn <- table(YN)
xn <- as.numeric(names(tn))
yn <- as.vector(tn)
zn <- yn/sum(yn)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/Wkl")
YR <- read.csv("./WKl_indegree.vec",header=FALSE,skip=1)$V1
tr <- table(YR)
xr <- as.numeric(names(tr))
yr <- as.vector(tr)
zr <- yr/sum(yr)
setwd("C:/Mail.Ru Cloud/ANR HSE/ANR Projects/SNA Vlado Batagelj/Comparison/Analyses/WKls")
YS <- read.csv("./WKls_Indegree.vec",header=FALSE,skip=1)$V1
ts <- table(YS)
xs <- as.numeric(names(ts))
ys <- as.vector(ts)
zs <- ys/sum(ys)
# plot frequencies
plot(xn,yn,pch=16,log='xy', col='red')
points(xr,yr,pch=16,col='blue')
points(xs,ys,pch=16,col='black')
# plot probabilities
plot(xn,zn,log='xy',pch=16,col='red', main = "WK Indegree - Probability distributions", xlab='freq',ylab='prob')
points(xr,zr,pch=16,col='blue')
points(xs,zs,pch=16,col='black')
legend("topright",
legend = c("SNA", "SNS(1)", "SNS(2)"),
col = c('red', 'blue', "black"),
pch = c(16,16),
bty = "n",
pt.cex = 2,
cex = 0.9,
text.col = "black",
horiz = F ,
#inset = c(0.1, 0.1)
)
WKindProbN