def initNN(self, file, hlayers, hnodes, classification): input = file.shape[1] - 1 if classification == 'regression': output = 1 if classification == 'classification': self.classes = list(file['class'].unique()) output = file['class'].nunique() neuralNet = NN.getNN(self, input, hlayers, hnodes, output) return (neuralNet)
def initNN(self, file, hlayers, hnodes, classification): '''Kieran Ringel Gets information needs to get shape of NN and then calls a function to get the shape''' input = file.shape[1] - 1 if classification == 'regression': #for regression there is one output node output = 1 if classification == 'classification': #for classification there is an output node for each class self.classes = list(file['class'].unique()) #creates a class variable to be reference later output = file['class'].nunique() neuralNet = NN.getNN(self, input, hlayers, hnodes, output) #initialized the shape of the NN return(neuralNet)