def plot_classification_evaluations_experiment(): import data labels = ['Freqency', 'Co-occurrence', 'Dependency'] legend = ['local', 'global'] d = [ [0.5678, 0.5455], # .., -2 [0.5694, 0.5333], [0.5889, 0.5056] ] ys = { .3: '0.0', .35: '...', .4: '0.4', .5: '0.5', .6: '0.6', .7: '0.7', .8: '0.8' } fig = plotter.tikz_barchart(d, labels, scale=3.5, yscale=3, color='black', legend=legend, legend_sep=0.6, low_cut=0.3, y_tics=ys, tick=False) data.write_to_file( fig, '../../masteroppgave/report/imgs/tikz/eval_classification.tex', mode='w')
def plot_retrieval_evaluations_experiment(): import data labels = ['Freqency','Co-occurrence','Dependency'] legend = ['local','global'] d = [[0.2240,0.2459], [0.2227,0.2559], [0.2020,0.2048]] ys = {0:'0.0', .1:'0.1', .2:'0.2', .3:'0.3', .4:'0.4'} fig = plotter.tikz_barchart(d, labels, scale = 3.5, yscale=3, color='black', legend=None, y_tics=ys, tick=False) data.write_to_file(fig,'../../masteroppgave/report/imgs/tikz/eval_retrieval.tex',mode='w')
def plot_classification_evaluations_experiment(): import data labels = ['Freqency','Co-occurrence','Dependency'] legend = ['local','global'] d = [[0.5678,0.5455], # .., -2 [0.5694,0.5333], [0.5889,0.5056]] ys = {.3:'0.0',.35:'...',.4:'0.4',.5:'0.5',.6:'0.6',.7:'0.7',.8:'0.8'} fig = plotter.tikz_barchart(d, labels, scale = 3.5, yscale=3, color='black', legend=legend, legend_sep=0.6, low_cut=0.3, y_tics=ys, tick=False) data.write_to_file(fig,'../../masteroppgave/report/imgs/tikz/eval_classification.tex',mode='w')
def plot_classification_comparison_experiment(): import data labels = ['Freqency','Co-occurrence','Dependency'] legend = ['local','global'] d = [[0.6693,0.6375], [0.6880,0.6875], [0.6827,0.6763]] ys = {.4:'0.0',.45:'...',.5:'0.5',.6:'0.6',.7:'0.7',.8:'0.8'} fig = plotter.tikz_barchart(d, labels, scale = 3.5, yscale=3, color='black', legend=legend, legend_sep=0.6, low_cut=0.4, y_tics=ys, tick=False) data.write_to_file(fig,'../../masteroppgave/report/imgs/tikz/comp_classification.tex',mode='w')
def plot_centrality_evaluations(): import data labels = ['~~~~~Degree','Closeness','Current-flow closeness','Betweenness','Current-flow betweenness','Load','Eigenvector','PageRank','HITS Authorities','HITS Hubs'] d = [ [0.5694444444444444,0.5333333333333333],#[0.5555555555555556,0.5333333333333333], [0.525,0.5166666666666667], [0.5194444444444445,0.5111111111111111], [0.4361111111111111,0.43333333333333335], [0.42777777777777776,0.4187],#[0.42777777777777776,0.05], [0.4361111111111111,0.4222222222222222], [0.5183333333333333,0.5055555555555555], [0.5573333333333333,0.5433333333333333], [0.5083333333333333,0.5083333333333333], [0.5083333333333333,0.5083333333333333]] ys = {.3:'0.0',.35:'...',.4:'0.4',.5:'0.5',.6:'0.6',.7:'0.7',.8:'0.8'} fig = plotter.tikz_barchart(d, None, scale = 3.5, yscale=3, color='black', legend = ['TC','TC-ICC'], legend_sep=0.6, low_cut=0.3, y_tics=ys, tick=False) data.write_to_file(fig,'../../masteroppgave/paper/parts/tikz_bar_co-occurrence.tex',mode='w') d = [ [0.52500000000000002,0.5028], [0.58894242452424244,0.5056],#[0.57499999999999996,0.5056], [0.56944444444444442,0.5028], [0.36388888888888887,0.3806], [0.23333333333333334,0.2263],#[0.23333333333333334,0.05], [0.35555555555555557,0.3778], [0.49722222222222223,0.4667], [0.52777777777777779,0.4833], [0.49722222222222223,0.4611], [0.49722222222222223,0.4611]] ys = {.0:'0.0',.1:'',.2:'0.2',.3:'',.4:'0.4',.5:'',.6:'0.6',.7:'',.8:'0.8'} fig = plotter.tikz_barchart(d, None, scale = 3.5, yscale=1.6, color='black', y_tics=ys, tick=False) data.write_to_file(fig,'../../masteroppgave/paper/parts/tikz_bar_dependency.tex',mode='w') fig = plotter.tikz_barchart(d, labels, scale = 3.5, color='black', labels_only=True) data.write_to_file(fig,'../../masteroppgave/paper/parts/tikz_bar_labels.tex',mode='w')
def plot_exp1(): """ Plotting the results of the weight evaluation experiment. """ legend = ['unweighted', 'weighted'] labels = ['Degree','Closeness','Current-flow closeness','Betweenness','Current-flow betweenness','Load','Eigenvector','PageRank','HITS authorities','HITS hubs'] # classification d = [[0.52500000000000002,0.49444444444444446], # Degree [0.57499999999999996,0.57499999999999996], # Closeness [0.56944444444444442,0.58333333333333337], # Current-flow closeness [0.36388888888888887,0.36944444444444446], # Betweenness [0.23333333333333334,0.20833333333333334], # Current-flow betweenness [0.35555555555555557,0.36666666666666664], # Load [0.49722222222222223,0.45555555555555555], # Eigenvector [0.52777777777777779,0.51111111111111107], # PageRank [0.49722222222222223,0.45555555555555555], # HITS authorities [0.49722222222222223,0.45555555555555555]] # HITS hubs ys = {0:'0.0',.1:'0.1',.2:'0.2', .3:'0.3',.4:'0.4',.5:'0.5',.6:'0.6'} fig = plotter.tikz_barchart(d, labels, scale = 3.5, yscale=2.8, color='black', legend=legend, legend_sep=1.0, tick=False, y_tics=ys) data.write_to_file(fig,'../../masteroppgave/report/imgs/tikz/dependency_eval_class.tex',mode='w') # retrieval d = [[0.18149811054435275,0.18821229318222113], # Degree [0.17184314735361236,0.18216618328598347], # Closeness [0.14606637651984622,0.13586098100141117], # Betweenness [0.17399729543537901,0.17613717518129621], # Current-flow closeness [0.042019078720146409,0.042019078720146409], # Current-flow betweenness [0.14700372822743263,0.15104493506838745], # Load [0.19854658693196564,0.17540014008712554], # Eigenvector [0.17725358882165362,0.17252331100724849], # PageRank [0.19854658693196564,0.17540014008712554], # HITS authorities [0.19854658693196564,0.17540014008712554]] # HITS hubs ys = {0:'0.0',.05:'0.05', .1:'0.1',.15:'0.15', .2:'0.2'} fig = plotter.tikz_barchart(d, labels, scale = 3.5, yscale=8, color='black', legend=legend, legend_sep=1.0, tick=False, grid_step=0.05, y_tics=ys) data.write_to_file(fig,'../../masteroppgave/report/imgs/tikz/dependency_eval_retr.tex',mode='w')
def plot_retrieval_evaluations_experiment(): import data labels = ['Freqency', 'Co-occurrence', 'Dependency'] legend = ['local', 'global'] d = [[0.2240, 0.2459], [0.2227, 0.2559], [0.2020, 0.2048]] ys = {0: '0.0', .1: '0.1', .2: '0.2', .3: '0.3', .4: '0.4'} fig = plotter.tikz_barchart(d, labels, scale=3.5, yscale=3, color='black', legend=None, y_tics=ys, tick=False) data.write_to_file( fig, '../../masteroppgave/report/imgs/tikz/eval_retrieval.tex', mode='w')
def plot_classification_comparison_experiment(): import data labels = ['Freqency', 'Co-occurrence', 'Dependency'] legend = ['local', 'global'] d = [[0.6693, 0.6375], [0.6880, 0.6875], [0.6827, 0.6763]] ys = {.4: '0.0', .45: '...', .5: '0.5', .6: '0.6', .7: '0.7', .8: '0.8'} fig = plotter.tikz_barchart(d, labels, scale=3.5, yscale=3, color='black', legend=legend, legend_sep=0.6, low_cut=0.4, y_tics=ys, tick=False) data.write_to_file( fig, '../../masteroppgave/report/imgs/tikz/comp_classification.tex', mode='w')
def plot_centrality_evaluations(): import data labels = [ '~~~~~Degree', 'Closeness', 'Current-flow closeness', 'Betweenness', 'Current-flow betweenness', 'Load', 'Eigenvector', 'PageRank', 'HITS Authorities', 'HITS Hubs' ] d = [ [0.5694444444444444, 0.5333333333333333], #[0.5555555555555556,0.5333333333333333], [0.525, 0.5166666666666667], [0.5194444444444445, 0.5111111111111111], [0.4361111111111111, 0.43333333333333335], [0.42777777777777776, 0.4187], #[0.42777777777777776,0.05], [0.4361111111111111, 0.4222222222222222], [0.5183333333333333, 0.5055555555555555], [0.5573333333333333, 0.5433333333333333], [0.5083333333333333, 0.5083333333333333], [0.5083333333333333, 0.5083333333333333] ] ys = { .3: '0.0', .35: '...', .4: '0.4', .5: '0.5', .6: '0.6', .7: '0.7', .8: '0.8' } fig = plotter.tikz_barchart(d, None, scale=3.5, yscale=3, color='black', legend=['TC', 'TC-ICC'], legend_sep=0.6, low_cut=0.3, y_tics=ys, tick=False) data.write_to_file( fig, '../../masteroppgave/paper/parts/tikz_bar_co-occurrence.tex', mode='w') d = [ [0.52500000000000002, 0.5028], [0.58894242452424244, 0.5056], #[0.57499999999999996,0.5056], [0.56944444444444442, 0.5028], [0.36388888888888887, 0.3806], [0.23333333333333334, 0.2263], #[0.23333333333333334,0.05], [0.35555555555555557, 0.3778], [0.49722222222222223, 0.4667], [0.52777777777777779, 0.4833], [0.49722222222222223, 0.4611], [0.49722222222222223, 0.4611] ] ys = { .0: '0.0', .1: '', .2: '0.2', .3: '', .4: '0.4', .5: '', .6: '0.6', .7: '', .8: '0.8' } fig = plotter.tikz_barchart(d, None, scale=3.5, yscale=1.6, color='black', y_tics=ys, tick=False) data.write_to_file( fig, '../../masteroppgave/paper/parts/tikz_bar_dependency.tex', mode='w') fig = plotter.tikz_barchart(d, labels, scale=3.5, color='black', labels_only=True) data.write_to_file(fig, '../../masteroppgave/paper/parts/tikz_bar_labels.tex', mode='w')
def plot_exp1(): """ Plotting the results of the weight evaluation experiment. """ legend = ['unweighted', 'weighted'] labels = [ 'Degree', 'Closeness', 'Current-flow closeness', 'Betweenness', 'Current-flow betweenness', 'Load', 'Eigenvector', 'PageRank', 'HITS authorities', 'HITS hubs' ] # classification d = [ [0.52500000000000002, 0.49444444444444446], # Degree [0.57499999999999996, 0.57499999999999996], # Closeness [0.56944444444444442, 0.58333333333333337], # Current-flow closeness [0.36388888888888887, 0.36944444444444446], # Betweenness [0.23333333333333334, 0.20833333333333334], # Current-flow betweenness [0.35555555555555557, 0.36666666666666664], # Load [0.49722222222222223, 0.45555555555555555], # Eigenvector [0.52777777777777779, 0.51111111111111107], # PageRank [0.49722222222222223, 0.45555555555555555], # HITS authorities [0.49722222222222223, 0.45555555555555555] ] # HITS hubs ys = { 0: '0.0', .1: '0.1', .2: '0.2', .3: '0.3', .4: '0.4', .5: '0.5', .6: '0.6' } fig = plotter.tikz_barchart(d, labels, scale=3.5, yscale=2.8, color='black', legend=legend, legend_sep=1.0, tick=False, y_tics=ys) data.write_to_file( fig, '../../masteroppgave/report/imgs/tikz/dependency_eval_class.tex', mode='w') # retrieval d = [ [0.18149811054435275, 0.18821229318222113], # Degree [0.17184314735361236, 0.18216618328598347], # Closeness [0.14606637651984622, 0.13586098100141117], # Betweenness [0.17399729543537901, 0.17613717518129621], # Current-flow closeness [0.042019078720146409, 0.042019078720146409], # Current-flow betweenness [0.14700372822743263, 0.15104493506838745], # Load [0.19854658693196564, 0.17540014008712554], # Eigenvector [0.17725358882165362, 0.17252331100724849], # PageRank [0.19854658693196564, 0.17540014008712554], # HITS authorities [0.19854658693196564, 0.17540014008712554] ] # HITS hubs ys = {0: '0.0', .05: '0.05', .1: '0.1', .15: '0.15', .2: '0.2'} fig = plotter.tikz_barchart(d, labels, scale=3.5, yscale=8, color='black', legend=legend, legend_sep=1.0, tick=False, grid_step=0.05, y_tics=ys) data.write_to_file( fig, '../../masteroppgave/report/imgs/tikz/dependency_eval_retr.tex', mode='w')