Skip to content

Commit

Permalink
Adjust to published version of paper
Browse files Browse the repository at this point in the history
  • Loading branch information
ppernot committed Apr 29, 2020
1 parent 359a409 commit 4f62783
Show file tree
Hide file tree
Showing 22 changed files with 232 additions and 52,600 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

# SIP

Codes and data to reproduce the results of the paper:
Codes and data to reproduce the results of:

* _Probabilistic performance estimators for computational chemistry methods: Systematic Improvement Probability and Ranking Probability Matrix_, by P. Pernot and A. Savin. WIP...
* P. Pernot and A. Savin (2020) _Probabilistic performance estimators for computational chemistry methods: Systematic Improvement Probability and Ranking Probability Matrix. I. Theory_, [_J. Chem. Phys._ __152__:164108](http://dx.doi.org/10.1063/5.0006202).

* P. Pernot and A. Savin (2020) _Probabilistic performance estimators for computational chemistry methods: Systematic Improvement Probability and Ranking Probability Matrix. II. Applications_, [_J. Chem. Phys._ __152__:164109](http://dx.doi.org/10.1063/5.0006204).
2 changes: 1 addition & 1 deletion analysis/0-Setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for (lib in libs) {
}
}
## Load packages and generate biblio
repmis::LoadandCite(libs,file='../article/packages.bib')
repmis::LoadandCite(libs) #,file='../article/packages.bib')

## Github package
lib = "ErrViewLib"
Expand Down
2 changes: 1 addition & 1 deletion analysis/Appendix_B.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source('0-Setup.R')

caseName = 'AppB'

# Fig. 30 ####
# Fig. I-5 ####

## g-and-h Samples CC
nMC = 1000
Expand Down
2 changes: 1 addition & 1 deletion analysis/Appendix_C.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ stop()

# Analysis ####

## Fig. 31
## Fig. I-6 ####

source('0-Setup.R')

Expand Down
4 changes: 2 additions & 2 deletions analysis/Appendix_D.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ b1l = boot(X, statistic = ErrViewLib::q95,R = nMC)
b2l = boot(X, statistic = ErrViewLib::q95hd,R = nMC)


# Fig. 32 ####
# Fig. I-7 ####
png(
file = paste0(figRepo,caseName,'_Compare_Q95.png'),
width = 1.75*gPars$reso,
Expand Down Expand Up @@ -332,7 +332,7 @@ for(score in scores) {

# save(resp,file = 'scoresBS.Rda')

# Fig. 33 ####
# Fig. I-8 ####
ifig=0
png(
file = paste0(figRepo,caseName,'_scoresBS.png'),
Expand Down
10 changes: 5 additions & 5 deletions analysis/BOR2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ sink()
# Figures ####
eps = 0.2 # eV : uncertainty level ("a few tenths of eV")

# Fig. 3 ####
# Fig. I-3 ####
ifig =1
png(file=paste0(figRepo,caseName,'_compareECDF.png'),
width=gPars$reso,height=gPars$reso)
Expand Down Expand Up @@ -130,7 +130,7 @@ ErrViewLib::plotDeltaCDF(
dev.off()
###

# Fig. 8 ####
# Fig. II-5 ####
png(
file = paste0(figRepo, caseName,'_Cormat_Errors_Spearman.png'),
width = 13/12*gPars$reso,
Expand All @@ -141,7 +141,7 @@ ErrViewLib::plotCorMat(cErr, order = 'hclust', gPars=gPars)
dev.off()
###

# Fig. 9 ####
# Fig. II-6 ####
ifig =1
png(file=paste0(figRepo,caseName,'_compareECDF2.png'),
width=gPars$reso,height=gPars$reso)
Expand Down Expand Up @@ -171,7 +171,7 @@ ErrViewLib::plotDeltaCDF(
dev.off()
####

# Fig. 10 ####
# Fig. II-7 ####
png(
file = paste0(figRepo, caseName,'_SIPHeatmap.png'),
width = 13/12*gPars$reso,
Expand All @@ -181,7 +181,7 @@ ErrViewLib::plotSIPMat(statBS$sip, gPars = gPars)
dev.off()
###

# Fig. 11 ####
# Fig. II-8 ####
ifig = 0
for (score in c('mue','q95hd','msip'))
for (type in c('levels','ci')[1]) {
Expand Down
4 changes: 2 additions & 2 deletions analysis/CAL2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sink()

# Figures ####

# Fig. 14 ####
# Fig. II-11 ####
# Selection of Delta CDF figs
dfas = unique(sapply(methList,function(x) strsplit(x,'-D')[[1]][1]))

Expand All @@ -85,7 +85,7 @@ for(dfa in dfas[c(4,5,10)]) {
}
###

# Fig. 15 ####
# Fig. II-12 ####
# D4-ATM and D3
sel1 = sort(c(seq(1,ncol(Errors),by=3),seq(3,ncol(Errors),by=3)))
ifig = 0
Expand Down
33 changes: 18 additions & 15 deletions analysis/DAS2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,9 @@ sink()

# Figures ####

# Fig. 19 ####
png(filename = paste0(figRepo,caseName,'_ParPlot.png'),
width=reso,height=reso)
ErrViewLib::plotParallel(
Errors,
rescale = TRUE,
labels = systems,
outliers = 'no',
lab.thresh = 1,
gPars=gPars)
dev.off()
###

# Fig. 20 ####

# Fig. II-16 ####
ifig=1
png(
file = paste0(figRepo, caseName,'_CorrMat_Errors_Spearman.png'),
Expand Down Expand Up @@ -173,7 +162,21 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig. 21 ####
# Fig. II-17 ####
png(filename = paste0(figRepo,caseName,'_ParPlot.png'),
width=reso,height=reso)
ErrViewLib::plotParallel(
Errors,
rescale = TRUE,
labels = systems,
outliers = 'no',
outLabCex = 3,
lab.thresh = 1,
gPars=gPars)
dev.off()
###

# Fig. II-18 ####
ifig=1
png(
file = paste0(figRepo, caseName,'_SIPHeatmap_Pruned.png'),
Expand Down Expand Up @@ -209,7 +212,7 @@ ErrViewLib::plotDeltaCDF(
dev.off()
###

# Fig. 22 ####
# Fig. II-19 ####
ifig = 0
for (score in c('mue','q95hd','msip'))
for (type in c('levels','ci')[1]) {
Expand Down
6 changes: 3 additions & 3 deletions analysis/JEN2018.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sink()

# Figures ####

# Fig. 16 ####
# Fig. II-13 ####
ifig=1
png(
file = paste0(figRepo, caseName,'_CorrMat_Errors_Spearman.png'),
Expand Down Expand Up @@ -94,7 +94,7 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig. 17 ####
# Fig. II-14 ####
ifig=1
png(file=paste0(figRepo,caseName,'_compareECDF.png'),
width=gPars$reso,height=gPars$reso)
Expand Down Expand Up @@ -146,7 +146,7 @@ ErrViewLib::plotDeltaCDF(
dev.off()
###

# Fig. 18 ####
# Fig. II-15 ####
ifig = 0
for (score in c('mue','q95hd','msip'))
for (type in c('levels','ci')[1]) {
Expand Down
4 changes: 2 additions & 2 deletions analysis/NAR2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sink()

# Figures ####

# Fig. 12 ####
# Fig. II-9 ####
cex.lab= 1.25
ifig=1
png(
Expand Down Expand Up @@ -102,7 +102,7 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig. 13 ####
# Fig. II-10 ####
ifig=1
png(file=paste0(figRepo,caseName,'_compareECDF.png'),
width=gPars$reso,height=gPars$reso)
Expand Down
55 changes: 4 additions & 51 deletions analysis/PER2018.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ gParsExt$cols = colsExt
gParsExt$cols_tr = colsExt_tr
gParsExt$cols_tr2 = colsExt_tr2


# Generate stats ####

statBS = ErrViewLib::estBS1(Errors,props = c("mue", "q95hd"))
Expand All @@ -55,7 +54,7 @@ sink()

# Figures ####

# Fig 2 ####
# Fig. II-2 ####
png(
file = paste0(figRepo, caseName,'_SIPHeatmap.png'),
width = 13/12*gPars$reso,
Expand All @@ -65,54 +64,8 @@ ErrViewLib::plotSIPMat(statBS$sip, gPars = gPars)
dev.off()

###
# Figs 4 and 7 ####
ifig=0
gParLoc = gPars
for (score in c('mue'))
for (type in c('levels','ci')) {
png(
file = paste0(figRepo, caseName,'_figRanks_',score,'_',type,'.png'),
width = 1.5*gPars$reso,
height = 1.5*gPars$reso
)
ifig = ifig + 1
cex.lab = 1
if(type == 'ci'){
cex.lab = 1.1
gParLoc$cex = 1.2*gPars$cex
}
ErrViewLib::plotRankMat(
E = Errors,
score = score,
type = type,
label = ifig,
cex.lab = cex.lab,
gPars = gParLoc
)
dev.off()
}

ifig=0
for (score in c('q95hd','msip'))
for (type in c('levels')) {
png(
file = paste0(figRepo, caseName,'_figRanks_',score,'_',type,'.png'),
width = 1.5*gPars$reso,
height = 1.5*gPars$reso
)
ifig = ifig + 1
ErrViewLib::plotRankMat(
E = Errors,
score = score,
type = type,
label = ifig,
gPars = gPars
)
dev.off()
}
###

# Figs 4 SPLIT ####
# Fig. II-4 ####
ifig=0
gParLoc = gPars
for (score in c('mue','q95hd','msip'))
Expand Down Expand Up @@ -140,7 +93,7 @@ for (score in c('mue','q95hd','msip'))
}
###

# Fig. 5 ####
# Fig. II-1 ####
cex.lab = 1.25
png(
file = paste0(figRepo, caseName,'_CorrMat_Errors_Spearman.png'),
Expand Down Expand Up @@ -208,7 +161,7 @@ h = hist(X[lower.tri(X)],breaks = seq(-1.1,1.1,by=0.2),
dev.off()
###

# Fig. 6 ####
# Fig. II-3 ####
ifig =1
png(file=paste0(figRepo,caseName,'_compareECDF.png'),
width=gPars$reso,height=gPars$reso)
Expand Down
8 changes: 4 additions & 4 deletions analysis/THA2015.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ sink()

# Figures ####
cex.lab = 1.0
# Fig. 23 ####
# Fig. II-20 ####
ifig = 1
png(file = paste0(figRepo, caseName,'_CorrMat_Errors.png'),
width = 1.5*gPars$reso,
Expand Down Expand Up @@ -175,7 +175,7 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig.25 ####
# Fig. II-22 ####
sel = c(1,2,4,7)
ifig = 1
png(file=paste0(figRepo,caseName,'_compareECDF_Pruned.png'),
Expand Down Expand Up @@ -207,7 +207,7 @@ ErrViewLib::plotUncEcdf(
dev.off()
###

# Fig. 26(a) ####
# Fig. II-23(a) ####
ifig = 1
png(file = paste0(figRepo, caseName,'_SIPHeatmap_Pruned.png'),
width = 13/12*gPars$reso,
Expand All @@ -217,7 +217,7 @@ dev.off()
###


# Fig. 27 top-middle ####
# Fig. II-24-(a-f) ####
ifig = 0
for (score in c('mue','q95hd','msip'))
for (type in c('levels','ci')[1]) {
Expand Down
8 changes: 4 additions & 4 deletions analysis/WU2015.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sink()

# Figures ####

# Fig. 1 ####
# Fig. I-1 ####
cex.lab = 1.0
ifig = 1
png(file = paste0(figRepo, caseName,'_CorrMat_Data_Spearman.png'),
Expand All @@ -87,7 +87,7 @@ ErrViewLib::plotCorMat(
gPars = gPars)
dev.off()

# Fig. 24 ####
# Fig. II-21 ####
cex.lab=1.0
ifig = 1
png(file = paste0(figRepo, caseName,'_CorrMat_Errors_Spearman.png'),
Expand Down Expand Up @@ -131,7 +131,7 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig. 26(b) ####
# Fig. II-23(b) ####
png(
file = paste0(figRepo, caseName,'_SIPHeatmap.png'),
width = 13/12*gPars$reso,
Expand All @@ -143,7 +143,7 @@ ErrViewLib::plotSIPMat(statBS$sip,
dev.off()
###

# Fig. 27 bottom ####
# Fig. II-24(g-i) ####
cex.lab=1
ifig = 6
for (score in c('mue','q95hd','msip'))
Expand Down
4 changes: 2 additions & 2 deletions analysis/ZAS2019.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sink()

# Figures ####

# Fig. 28 ####
# Fig. II-25 ####
cex.lab = 1.0
ifig=1
png(
Expand Down Expand Up @@ -108,7 +108,7 @@ ErrViewLib::plotCorMat(
dev.off()
###

# Fig. 29 ####
# Fig. II-26 ####
ifig=1
png(file=paste0(figRepo,caseName,'_compareECDF.png'),
width= gPars$reso,height= gPars$reso)
Expand Down
Loading

0 comments on commit 4f62783

Please sign in to comment.