def main(argv=None):
    fsc_all = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Results/Summary.txt",
        column=2,
        ignore_first_line=False)
    fsc_opt = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Results/Summary.txt",
        column=5,
        ignore_first_line=False)
    fsc_min = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Results/Summary.txt",
        column=10,
        ignore_first_line=False)
    #
    f_scores_b2_all = []
    f_scores_b2_all_minval = 1
    f_scores_b2_all_maxval = 0
    f_scores_b2_all_minlabel = ""
    f_scores_b2_all_maxlabel = ""
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsAllFeatures"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsAllFeatures/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsAllFeatures/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsAllFeatures/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    val = vals[len(vals) - 1]
                    if val < f_scores_b2_all_minval:
                        f_scores_b2_all_minval = val
                        f_scores_b2_all_minlabel = d + "/" + f
                    if val > f_scores_b2_all_maxval:
                        f_scores_b2_all_maxval = val
                        f_scores_b2_all_maxlabel = d + "/" + f
                    f_scores_b2_all.append(val)
    #
    f_scores_b2_min = []
    f_scores_b2_min_minval = 1
    f_scores_b2_min_maxval = 0
    f_scores_b2_min_minlabel = ""
    f_scores_b2_min_maxlabel = ""
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsOptimizedMinimized"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsOptimizedMinimized/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsOptimizedMinimized/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGraph/StatsOptimizedMinimized/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    val = vals[len(vals) - 1]
                    if val < f_scores_b2_min_minval:
                        f_scores_b2_min_minval = val
                        f_scores_b2_min_minlabel = d + "/" + f
                    if val > f_scores_b2_min_maxval:
                        f_scores_b2_min_maxval = val
                        f_scores_b2_min_maxlabel = d + "/" + f
                    f_scores_b2_min.append(val)
    #
    f_scores_b3_all = []
    f_scores_b3_all_minval = 1
    f_scores_b3_all_maxval = 0
    f_scores_b3_all_minlabel = ""
    f_scores_b3_all_maxlabel = ""
    for f in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Random_43x43/StatsAllFeatures"
    ):
        if f.endswith(".txt"):
            vals = IOUtil.get_float_column(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Random_43x43/StatsAllFeatures/"
                + f,
                1,
                ignore_first_line=True)
            val = vals[len(vals) - 1]
            if val < f_scores_b3_all_minval:
                f_scores_b3_all_minval = val
                f_scores_b3_all_minlabel = f
            if val > f_scores_b3_all_maxval:
                f_scores_b3_all_maxval = val
                f_scores_b3_all_maxlabel = f
            f_scores_b3_all.append(val)
    #
    f_scores_b3_min = []
    f_scores_b3_min_minval = 1
    f_scores_b3_min_maxval = 0
    f_scores_b3_min_minlabel = ""
    f_scores_b3_min_maxlabel = ""
    for f in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Random_43x43/StatsOptimizedMinimized"
    ):
        if f.endswith(".txt"):
            vals = IOUtil.get_float_column(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Random_43x43/StatsOptimizedMinimized/"
                + f,
                1,
                ignore_first_line=True)
            val = vals[len(vals) - 1]
            if val < f_scores_b3_min_minval:
                f_scores_b3_min_minval = val
                f_scores_b3_min_minlabel = f
            if val > f_scores_b3_min_maxval:
                f_scores_b3_min_maxval = val
                f_scores_b3_min_maxlabel = f
            f_scores_b3_min.append(val)
    #
    f_scores_b4_all = []
    f_scores_b4_all_minval = 1
    f_scores_b4_all_maxval = 0
    f_scores_b4_all_minlabel = ""
    f_scores_b4_all_maxlabel = ""
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsAllFeatures"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsAllFeatures/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsAllFeatures/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsAllFeatures/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    val = vals[len(vals) - 1]
                    if val < f_scores_b4_all_minval:
                        f_scores_b4_all_minval = val
                        f_scores_b4_all_minlabel = d + "/" + f
                    if val > f_scores_b4_all_maxval:
                        f_scores_b4_all_maxval = val
                        f_scores_b4_all_maxlabel = d + "/" + f
                    f_scores_b4_all.append(val)
    #
    f_scores_b4_min = []
    f_scores_b4_min_minval = 1
    f_scores_b4_min_maxval = 0
    f_scores_b4_min_minlabel = ""
    f_scores_b4_min_maxlabel = ""
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsOptimizedMinimized"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsOptimizedMinimized/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsOptimizedMinimized/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/RandomGoldRandomClasses/StatsOptimizedMinimized/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    val = vals[len(vals) - 1]
                    if val < f_scores_b4_min_minval:
                        f_scores_b4_min_minval = val
                        f_scores_b4_min_minlabel = d + "/" + f
                    if val > f_scores_b4_min_maxval:
                        f_scores_b4_min_maxval = val
                        f_scores_b4_min_maxlabel = d + "/" + f
                    f_scores_b4_min.append(val)

    fsc_all_boxplot = BoxPlot(fsc_all, "fsc_all_boxplot")
    fsc_opt_boxplot = BoxPlot(fsc_opt, "fsc_opt")
    fsc_min_boxplot = BoxPlot(fsc_min, "fsc_min")
    f_scores_b2_all_boxplot = BoxPlot(f_scores_b2_all,
                                      "f_scores_b2_all",
                                      minlabel=f_scores_b2_all_minlabel,
                                      maxlabel=f_scores_b2_all_maxlabel)
    f_scores_b2_min_boxplot = BoxPlot(f_scores_b2_min,
                                      "f_scores_b2_min",
                                      minlabel=f_scores_b2_min_minlabel,
                                      maxlabel=f_scores_b2_min_maxlabel)
    f_scores_b3_all_boxplot = BoxPlot(f_scores_b3_all,
                                      "f_scores_b3_all",
                                      minlabel=f_scores_b3_all_minlabel,
                                      maxlabel=f_scores_b3_all_maxlabel)
    f_scores_b3_min_boxplot = BoxPlot(f_scores_b3_min,
                                      "f_scores_b3_min",
                                      minlabel=f_scores_b3_min_minlabel,
                                      maxlabel=f_scores_b3_min_maxlabel)
    f_scores_b4_all_boxplot = BoxPlot(f_scores_b4_all,
                                      "f_scores_b4_all",
                                      minlabel=f_scores_b4_all_minlabel,
                                      maxlabel=f_scores_b4_all_maxlabel)
    f_scores_b4_min_boxplot = BoxPlot(f_scores_b4_min,
                                      "f_scores_b4_min",
                                      minlabel=f_scores_b4_min_minlabel,
                                      maxlabel=f_scores_b4_min_maxlabel)

    print(fsc_all_boxplot.get_tikz())
    print(fsc_opt_boxplot.get_tikz())
    print(fsc_min_boxplot.get_tikz())
    print(f_scores_b2_all_boxplot.get_tikz())
    print(f_scores_b2_min_boxplot.get_tikz())
    print(f_scores_b3_all_boxplot.get_tikz())
    print(f_scores_b3_min_boxplot.get_tikz())
    print(f_scores_b4_all_boxplot.get_tikz())
    print(f_scores_b4_min_boxplot.get_tikz())
def ddcplots(argv=None):
    fsc_all = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/DDCResults/Summary.txt",
        column=3,
        ignore_first_line=False)
    fsc_opt = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Results/Summary.txt",
        column=6,
        ignore_first_line=False)
    fsc_min = IOUtil.get_float_column(
        "k:/Wiki/StadtWikis/DDC/Classification/SimilarityGraph/Results/Summary.txt",
        column=11,
        ignore_first_line=False)
    #
    f_scores_b3_all = []
    for f in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/Random_43x98/StatsAllFeatures"
    ):
        if f.endswith(".txt"):
            vals = IOUtil.get_float_column(
                "k:/Wiki/StadtWikis/DDC/Classification/Random_43x98/StatsAllFeatures/"
                + f,
                1,
                ignore_first_line=True)
            f_scores_b3_all.append(vals[len(vals) - 1])
    #
    f_scores_b3_min = []
    for f in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/Random_43x98/StatsOptimizedMinimized"
    ):
        if f.endswith(".txt"):
            vals = IOUtil.get_float_column(
                "k:/Wiki/StadtWikis/DDC/Classification/Random_43x98/StatsOptimizedMinimized/"
                + f,
                1,
                ignore_first_line=True)
            f_scores_b3_min.append(vals[len(vals) - 1])
    #
    f_scores_b4_all = []
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsAllFeatures"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsAllFeatures/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsAllFeatures/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsAllFeatures/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    f_scores_b4_all.append(vals[len(vals) - 1])
    #
    f_scores_b4_min = []
    for d in listdir(
            "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsOptimizedMinimized"
    ):
        if isdir(
                "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsOptimizedMinimized/"
                + d):
            for f in listdir(
                    "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsOptimizedMinimized/"
                    + d):
                if f.endswith(".txt"):
                    vals = IOUtil.get_float_column(
                        "k:/Wiki/StadtWikis/DDC/Classification/DDCRandomGoldRandomClasses/StatsOptimizedMinimized/"
                        + d + "/" + f,
                        1,
                        ignore_first_line=True)
                    f_scores_b4_min.append(vals[len(vals) - 1])
    fsc_all_boxplot = BoxPlot(fsc_all, "fsc_all_boxplot")
    fsc_opt_boxplot = BoxPlot(fsc_opt, "fsc_opt")
    fsc_min_boxplot = BoxPlot(fsc_min, "fsc_min")
    f_scores_b3_all_boxplot = BoxPlot(f_scores_b3_all, "f_scores_b3_all")
    f_scores_b3_min_boxplot = BoxPlot(f_scores_b3_min, "f_scores_b3_min")
    f_scores_b4_all_boxplot = BoxPlot(f_scores_b4_all, "f_scores_b4_all")
    f_scores_b4_min_boxplot = BoxPlot(f_scores_b4_min, "f_scores_b4_min")

    print(fsc_all_boxplot.get_tikz())
    print(fsc_opt_boxplot.get_tikz())
    print(fsc_min_boxplot.get_tikz())
    print(f_scores_b3_all_boxplot.get_tikz())
    print(f_scores_b3_min_boxplot.get_tikz())
    print(f_scores_b4_all_boxplot.get_tikz())
    print(f_scores_b4_min_boxplot.get_tikz())