Y_values = p.getY()
    number_of_instances = p.getNumberOfInstances()

    #X the array of inputs, Y the array of outputs

    X = np.array(X_values)
    Y = np.array(Y_values)
    neuralNetwork = NeuralNetwork(X, Y, 2)

    neuralNetwork.loss = []
    iterations = []
    for i in range(1000):  # noOfIterations
        neuralNetwork.feedforward()

        # learning rate = 0.0000001
        neuralNetwork.backprop(0.0000001)

        iterations.append(i)

    #In this plot we can see how the loss function decreases as iterations increase

    plt.pyplot.plot(iterations,
                    neuralNetwork.loss,
                    label='loss value vs iteration')
    plt.pyplot.xlabel('Iterations')
    plt.pyplot.ylabel('loss function')
    plt.pyplot.legend()
    plt.pyplot.show()

    print(neuralNetwork.output)