@@ -0,0 +1,1399 @@
+import numpy as np%0Aimport matplotlib.pyplot as plt%0A%0A%0Adef plot_2d_space(model, one_hot_encoder, x, y, n=None):%0A    if n is None:%0A        n = len(x)%0A%0A    n = len(x)%0A%0A    predictions = model.predict(x%5B:n%5D)%0A%0A    correct_coords = %5B%5D%0A    incorrect_coords = %5B%5D%0A%0A    for i, prediction in enumerate(predictions):%0A        target = y%5Bi%5D%0A%0A        equation_string = one_hot_encoder.one_hot_to_string(x%5Bi%5D)%0A        prediction_string = one_hot_encoder.one_hot_to_string(prediction)%0A        target_string = one_hot_encoder.one_hot_to_string(target)%0A%0A        equation_plus_index = equation_string.index('+')%0A        n1 = int(equation_string%5B:equation_plus_index-1%5D)%0A        n2 = int(equation_string%5Bequation_plus_index+1:%5D)%0A%0A        if prediction_string == target_string:%0A            # Correct%0A            correct_coords.append((n1, n2,))%0A        else:%0A            incorrect_coords.append((n1, n2,))%0A%0A    # Create plot%0A    fig = plt.figure()%0A    ax = fig.add_subplot(1, 1, 1, axisbg=%221.0%22)%0A%0A    correct_coords = np.array(correct_coords)%0A    ax.scatter(%0A        correct_coords%5B:, 0%5D,%0A        correct_coords%5B:, 1%5D,%0A        alpha=0.33, c='green', edgecolors='none', s=20, label='correct'%0A    )%0A%0A    incorrect_coords = np.array(incorrect_coords)%0A    ax.scatter(%0A        incorrect_coords%5B:, 0%5D,%0A        incorrect_coords%5B:, 1%5D,%0A        alpha=0.33, c='red', edgecolors='none', s=20, label='incorrect'%0A    )%0A%0A    plt.show()%0A

Add code for plotting 2d graph