def learn_parameters(hpoGraph, uni2hpoDict, dataset): out.writeDebug('Start training the predictor.') from predictor import Predictor neuralNet = Predictor(None) # in crosstraining, the test set is the crossTrain and the crossTrain set is the (here ignored) test set crossTrainSet = {'train': dataset['train'], 'crossTrain': dataset['test'], 'test': dataset['crossTrain']} trainingNodes = train_result_set(hpoGraph, uni2hpoDict, crossTrainSet) out.writeDebug('Collected all the nodes for training') if shortcut: neuralNet.trainprediction(trainingNodes, maxEpochs = 10) else: neuralNet.trainprediction(trainingNodes) return neuralNet