Question: please complete all parts use python thank you! Problem 1) Perceptron learning in Python: a) Create class NeuralNetwork(): that creates a single neuron, train it,
Problem 1) Perceptron learning in Python: a) Create class NeuralNetwork(): that creates a single neuron, train it, and test it. This class should have the following function: i def_init__(self): that initializes a 3xl weight vector randomly and initializes the learning rate to 1. ii. def hard_limiter(self,x): that performs the hard-limiter activation on the nx vector x def forward propagation(self, inputs): that performs the forward propagation by multiplying the inputs by the neuron weights and passing the output through the hard_limiter activation function iv. def train(self, inputs, labels, num_train_iterations-10): that performs the perceptron learning rule for num_train_iterations times using the inputs and labels. def pred(self, inputs): classifies the inputs to either class 0 or 1 by multiplying them by the neuron weights, passing the output through the hard_limiter activation function and thresholding. V
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
