def test_sexmachine_confusion_matrix_method_returns_correct_result(self): s = DameSexmachine() cm = s.confusion_matrix() am = np.array([[3, 0, 0],[1, 15, 0],[1, 1, 0]]) self.assertTrue(np.array_equal(cm,am))
dgg = DameGenderGuesser() if (args.dimensions == "3x2"): print("Gender Guesser confusion matrix:\n") dgg.print_confusion_matrix_dame(path=args.csv) elif (args.dimensions == "3x3"): genderguesser_confusion_matrix = dgg.confusion_matrix(path=args.csv) print("Gender Guesser confusion matrix:\n %s" % genderguesser_confusion_matrix) ds = DameSexmachine() if (args.dimensions == "3x2"): print("Sexmachine confusion matrix:\n") ds.print_confusion_matrix_dame(path=args.csv, ml=args.ml) elif (args.dimensions == "3x3"): ds = DameSexmachine() sexmachine_confusion_matrix = ds.confusion_matrix(path=args.csv) print("Sexmachine confusion matrix:\n %s" % sexmachine_confusion_matrix) # dna = DameNameapi() # if (args.dimensions == "3x2"): # print("Nameapi confusion matrix:\n") # dna.print_confusion_matrix_dame(path=args.csv) # elif (args.dimensions == "3x3"): # nameapi_confusion_matrix = dna.confusion_matrix(path=args.csv) # print("Nameapi confusion matrix:\n %s" % nameapi_confusion_matrix) elif (args.api == "namsor"): dn = DameNamsor() if (args.dimensions == "3x2"): print("Namsor confusion matrix:\n")