Question: Given five samples and three features (x 1 , x 2 , x 3 ) and the corresponding labels y: Sample x 1 x 2

Given five samples and three features (x1, x2, x3) and the corresponding labels y:

Sample x1 x2 x3 y

1 1 1 1 1

2 1 0 0 0

3 1 1 0 0

4 0 1 1 1

5 1 0 1 1

We want to train a neural network on this data. The input layer has three nodes, the output layer has one artificial neuron, and there are no hidden layers. The activation function is the sigmoid function. Write a python code which trains the network. P.S. Do not use classes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!