usingDataFramesusingDistributionsimportPyPlotusingGadflyinclude("Tests/ttest_correlated.jl")include("Tests/Bttest_correlated.jl")include("Plots/plot_posterior_ttest.jl")include("Plots/plot_data.jl")include("Data/get_accuracies.jl")ClassID=readdlm("Data/ClassifierID.dat",',')ClassNames=readdlm("Data/ClassifierNames.dat",',')DatasetID=readdlm("Data/DatasetID.dat",',');DatasetNames=readdlm("Data/DatasetNames.dat",',');Percent_correct=readdlm("Data/Percent_correct.dat",',');rho=1/10#Classifiers compare nbc versus aode on datasets 1cl1=1#nbccl2=2#aodedataset=46#datasetprintln("Comparison of ",ClassNames[cl1,1]," vs. ",ClassNames[cl2,1])println("in dataset ",DatasetNames[dataset,1])println()#load accuraciesacci,accj=get_accuracies(cl1,cl2,dataset,ClassID,DatasetID,Percent_correct)# perform Bayesian correlated t-testrope=0.01hdi_prob=0.95mur,sigmar,dofr,p_r,p_l,p_rope,hdi=Bttest_correlated(acci-accj,rho,0,-rope,rope,hdi_prob)println("Parameters of the posterior mean=$(mur[1]), dev.std=$(sigmar[1]) and dof=$dofr")println()#Plot posteriorp1=plot_posterior_ttest(cl1,cl2,dataset,mur,sigmar,dofr,-0.26,0.2)display(p1)
Comparison of nbc vs. aode
in dataset squash-unstored
WARNING: Method definition ttest_correlated(Any, Any, Any, Any, Any) in module Main at /home/benavoli/Data/Github/tutorial/Julia/Tests/ttest_correlated.jl:11 overwritten at /home/benavoli/Data/Github/tutorial/Julia/Tests/ttest_correlated.jl:11.
WARNING: Method definition Bttest_correlated(Any, Any, Any, Any, Any, Any) in module Main at /home/benavoli/Data/Github/tutorial/Julia/Tests/Bttest_correlated.jl:15 overwritten at /home/benavoli/Data/Github/tutorial/Julia/Tests/Bttest_correlated.jl:15.
WARNING: Method definition plot_posterior_ttest(Any, Any, Any, Any, Any, Any, Any, Any) in module Main at /home/benavoli/Data/Github/tutorial/Julia/Plots/plot_posterior_ttest.jl:3 overwritten at /home/benavoli/Data/Github/tutorial/Julia/Plots/plot_posterior_ttest.jl:3.
WARNING: Method definition plot_data(Any, Any, Any, Any, Any, Any) in module Main at /home/benavoli/Data/Github/tutorial/Julia/Plots/plot_data.jl:5 overwritten at /home/benavoli/Data/Github/tutorial/Julia/Plots/plot_data.jl:5.
WARNING: Method definition get_accuracies(Any, Any, Any, Any, Any, Any) in module Main at /home/benavoli/Data/Github/tutorial/Julia/Data/get_accuracies.jl:3 overwritten at /home/benavoli/Data/Github/tutorial/Julia/Data/get_accuracies.jl:3.
Parameters of the posterior mean=-0.055999993896000376, dev.std=0.05423222985646852 and dof=99.0
Compute the area under the density (left and right)