from xlrd import open_wrkbkimport arbitraryimport numpy as nump from matplotlib import plotclass ANN: # initial set input = output = # training set training_input = training_output = # test set test_input = test_output = # weights Wt1 = Wt2 = # counter n = # variables to plot x = y = def intial(Machine, File, learn, error): # get export accordingly print(‘starting ANN with set “‘ + File+'”‘) Machine.Input(File) # Take at random to be part of the dataset print(‘distributing dataset…’) Machine.n = arbitrary.sample(range(0, len(Machine.input)-1), 26) Machine.trainingset() Machine.testingset() Machine.Weight() print(‘Back Propagation’) Machine.learn(learn, error) print(‘ done’) def trainingset(Machine): in_set = out_set = while i in Machine.n: in_set.append(Machine.inputi) out_set.append(Machine.outputi) Machine.training_input = in_set Machine.training_output = out_set # get weights based on training set dimensions def Weight(Machine): x = len(Machine.input0) y = len(Machine.output0) m1 = m2 = i=0 while i