Ejemplo n.º 1
0
def print_perceptron_update(xs, ws, bias, y):
    """ Prints initial and updated ws. """
    
    # Convert xs ans ws to the proper form
    # for use in perceptron
    xs, ws = setup_bias(xs, ws, bias)
    ws_new, h_new = perceptron_update(xs, ws, y)

    print("ws_intial: {0}\nws_new: {1}".format(ws, ws_new))