for key in classifier_dict: myclassifier = classifier_dict[key] acc = D.ClfScatter(myclassifier, title=key) return acc # Return the last accuracy (important to get the correct answer in the TP) if __name__ == "__main__": # We can use this function to test the Classifier if len( argv ) == 1: # Use the default input and output directories if no arguments are provided input_dir = "../public_data" output_dir = "../results" score_dir = "../scoring_program" else: input_dir = argv[1] output_dir = argv[2] score_dir = argv[3] # The M2 may have prepared challenges using sometimes AutoML challenge metrics path.append(score_dir) from zDataManager import DataManager # The class provided by binome 1 basename = 'Iris' D = DataManager(basename, input_dir) # Load data print(D) test(D)
""" Created on Sat Mar 11 08:04:23 2017 @author: isabelleguyon This is an example of program that tests the Iris challenge Data Manager class. Another style is to incorporate the test as a main function in the Data manager class itself. """ from zDataManager import DataManager mypath = "../sample_code" from sys import argv, path from os.path import abspath path.append(abspath(mypath)) if __name__ == "__main__": # We can use this to run this file as a script and test the DataManager if len( argv ) == 1: # Use the default input and output directories if no arguments are provided input_dir = "../public_data" output_dir = "../res" else: input_dir = argv[1] output_dir = argv[2] print("Using input_dir: " + input_dir) print("Using output_dir: " + output_dir) basename = 'movies' D = DataManager(basename, input_dir)