Example #1
0
def print_results(clfs):
  file_name = time.strftime(os.path.sep.join([".", "results",
                                              "%Y%m%d_%H:%M:%S.txt"]))
  content = ""
  for each in clfs:
    content += each.confusion
  with open(file_name, "w") as f:
    f.write(content)
  results_process.reports(file_name)
Example #2
0
def print_results(clfs):
#   file_name = time.strftime(os.path.sep.join([".", "results",
#                                               "%Y%m%d_%H:%M:%S.txt"]))
  file_name = "output_see_new_pso_wdamp_5x5.txt"
  content = ""
  for each in clfs:
    content += each.confusion
  with open(file_name, "w") as f:
    f.write(content)
  results_process.reports(file_name)
Example #3
0
def print_results(clfs, stop, start):
    file_name = time.strftime(
        os.path.sep.join([".", "results", "%Y%m%d_%H:%M:%S.txt"]))
    file_name = os.path.sep.join(["20171103.txt"])
    content = ""
    for each in clfs:
        content += each.confusion
    print(content)
    print("Model training time: ", stop - start)
    with open(file_name, "w") as f:
        f.write(content)
    results_process.reports(file_name)
Example #4
0
def print_results(clfs, stop, start, filename="output.txt"):
    file_name = os.path.sep.join([filename])
    content = ""
    content += "\nITERATION NUMBER: " + str(
        experiment.iteration_num
    ) + "\n============================================\n"
    for each in clfs:
        content += each.confusion
    print(content)
    content += "\nTime: " + str(stop - start)
    print("Model training time: ", stop - start)
    with open(file_name, "a+") as f:
        f.write(content)

    results_process.reports(file_name)