Finished perceptron_with_bias algorithm