﻿1
00:00:01,290 --> 00:00:10,050
‫Let's start with perceptrons, like in biology, a single cell of our nervous system is called a neuron

2
00:00:11,100 --> 00:00:12,810
‫in artificial neural networks.

3
00:00:13,500 --> 00:00:17,580
‫One of the earliest such artificial neuron was a Perceptron.

4
00:00:19,170 --> 00:00:22,020
‫Perceptron was delivered in 1950s.

5
00:00:23,070 --> 00:00:27,390
‫Yes, the work on your networks began nearly 70 years ago.

6
00:00:29,240 --> 00:00:35,940
‫Today, we use other models of artificial neurons, such as sigmoid neurons, to understand sigmoid neurons.

7
00:00:36,210 --> 00:00:37,980
‫We need to first look at the Perceptron.

8
00:00:40,350 --> 00:00:44,250
‫Here's a simple pictorial representation of how a Perceptron works.

9
00:00:45,660 --> 00:00:55,620
‫Perceptron is this circle or a black box, which takes in several binary inputs x1, x2, x3 and so

10
00:00:55,620 --> 00:01:07,140
‫on till xm and produces a single binary output represented by y, but binary input and binary output.

11
00:01:07,620 --> 00:01:17,280
‫I mean that these variables can only take two values, for example, zero and one true or false, etc..

12
00:01:19,170 --> 00:01:27,420
‫There are several ways in which these x1 x2 x3 can give us the desired output y.

13
00:01:28,710 --> 00:01:29,730
‫One of these rule is

14
00:01:32,430 --> 00:01:43,470
‫that we will multiply each of these input values with weights, W1, W2, W3 and then compare.

15
00:01:43,650 --> 00:01:53,040
‫If the final value of the sum of these products is greater than a threshold value or not, if the

16
00:01:53,040 --> 00:01:58,890
‫sum value is greater, then the Perceptron gives an output value of one.

17
00:02:00,120 --> 00:02:05,610
‫And if it is less than threshold, it gives out an output value of zero.

18
00:02:07,690 --> 00:02:10,560
‫Mathematically, this is how we represent this logic.

19
00:02:11,790 --> 00:02:16,080
‫This is the submission of weights with feature values.

20
00:02:16,590 --> 00:02:28,700
‫Basically, this means X1 into W1 plus X2 into W2 plus X3 into W3 and so till Xm into Wm. Basically

21
00:02:30,270 --> 00:02:32,010
‫The sum of all these product.

22
00:02:32,700 --> 00:02:34,120
‫Is this left hand term

23
00:02:35,160 --> 00:02:38,130
‫We compared this sum, with the threshold value.

24
00:02:38,700 --> 00:02:42,600
‫If this is less than the threshold, we give an output of zero.

25
00:02:43,440 --> 00:02:46,430
‫If it is more than the threshold, we give output of 1

26
00:02:51,070 --> 00:02:57,010
‫Let's take a simple example, which may not be very realistic, but you will get the idea of how this

27
00:02:57,010 --> 00:02:58,600
‫Perceptron functions.

28
00:03:00,940 --> 00:03:05,890
‫Let's say you want to decide whether you should purchase  a particular shirt or not.

29
00:03:08,470 --> 00:03:17,710
‫You might make your decision by weighing up three factors, whether the shirt is blue or not, whether

30
00:03:17,710 --> 00:03:24,130
‫the shirt is full sleeve or half sleeve and whether the fabric is cotton or not.

31
00:03:26,530 --> 00:03:30,460
‫We can represent these three variables using three binary variables.

32
00:03:32,750 --> 00:03:36,440
‫For instance, X1 is equal to one.

33
00:03:36,680 --> 00:03:43,370
‫If the shirt is blue and it is zero, if it is not blue, x2 is equal to one.

34
00:03:43,430 --> 00:03:53,330
‫If it is full sleeved and zero if it is half sleeved and x3 is equal to one for cotton fabric and zero for

35
00:03:53,560 --> 00:03:54,530
‫non-cotton fabric.

36
00:03:57,170 --> 00:04:04,730
‫Now, suppose that you absolutely adored Blue-colord shirts and you would prefer full sleeved cotton

37
00:04:04,730 --> 00:04:11,480
‫fabric shirts but sleeve length and cotton fabric is not as important as the color of the shirt.

38
00:04:13,580 --> 00:04:19,280
‫So here are sample weights of importance that you assign to these features.

39
00:04:20,900 --> 00:04:24,520
‫You give weight of seven to the shirt color.

40
00:04:25,820 --> 00:04:29,480
‫I have replaced the value of W1 with this number seven.

41
00:04:30,920 --> 00:04:36,530
‫We assign a weight of four to sleeve length and a weight of two to the fabric.

42
00:04:38,120 --> 00:04:45,200
‫Finally, we also take a threshold value of 8 to decide whether to purchase the shirt or not.

43
00:04:47,120 --> 00:04:53,780
‫With these choices of weights and threshold, let's see which of these 3 shirts would we buy.

44
00:04:56,330 --> 00:05:03,590
‫So for this first shirt, we have blue in the first column, which signifies the color of the shirt.

45
00:05:04,100 --> 00:05:04,940
‫It is half sleeved.

46
00:05:05,240 --> 00:05:06,590
‫So half in the second column.

47
00:05:07,010 --> 00:05:09,680
‫It is non cotton, so non cotton in the third column.

48
00:05:09,980 --> 00:05:10,910
‫which is for fabric.

49
00:05:11,930 --> 00:05:18,260
‫The fourth column is for calculation of sum, as I told you previously.

50
00:05:18,710 --> 00:05:25,920
‫We calculate the product of weights with the features, add them together to find the calculated sum

51
00:05:27,860 --> 00:05:28,850
‫in the Fifth Column.

52
00:05:29,180 --> 00:05:34,790
‫We have written the threshold value that is predecided. In the sixth column.

53
00:05:35,030 --> 00:05:38,540
‫We compare this sum value with the threshold value

54
00:05:38,960 --> 00:05:42,110
‫If the sum is greater than threshold, we will buy the shirt.

55
00:05:42,440 --> 00:05:45,470
‫If the sum is less than threshold, we will not buy the shirt.

56
00:05:47,120 --> 00:05:49,880
‫So let's let's see what happens with this first shirt.

57
00:05:50,990 --> 00:05:54,350
‫The first shirt is blue in color, for blue.

58
00:05:54,740 --> 00:05:57,890
‫We have x1 value of one for not blue.

59
00:05:57,980 --> 00:05:58,970
‫It would have been zero.

60
00:05:59,660 --> 00:06:03,350
‫So x1 is 1. x2.

61
00:06:03,890 --> 00:06:07,100
‫We just leave is zero because it is half sleeved.

62
00:06:08,510 --> 00:06:11,200
‫Fabric is non cotton which is again zero.

63
00:06:13,670 --> 00:06:16,060
‫We find out the sum product seven.

64
00:06:16,480 --> 00:06:25,040
‫It is weightage for color multiply by the value of X1, which is one plus four.

65
00:06:25,080 --> 00:06:30,630
‫weightage for sleeves multiplied by the value of X2, which is zero because it is half sleeved.

66
00:06:31,250 --> 00:06:38,330
‫Plus two, which is weightage for fabric multiplied by the value of fabric, which is zero because

67
00:06:38,330 --> 00:06:39,590
‫it is not cotton.

68
00:06:41,030 --> 00:06:43,160
‫The final summary we get is seven.

69
00:06:44,120 --> 00:06:48,100
‫We compare this sum value with the threshold value, which is eight.

70
00:06:48,970 --> 00:06:50,630
‫The sum is less than eight.

71
00:06:51,470 --> 00:06:53,900
‫So we are not going to buy this shirt.

72
00:06:56,360 --> 00:06:58,670
‫Let's do this activity for the second shirt.

73
00:06:59,090 --> 00:07:03,820
‫The second shirt is blue colored, full sleeved and non cotton fabric.

74
00:07:05,000 --> 00:07:13,110
‫If you repeat the calculation, the only difference is going to be the value of X2, for full sleeve

75
00:07:13,140 --> 00:07:14,570
‫shirt X2 will be one.

76
00:07:14,960 --> 00:07:17,180
‫So seven plus four is going to come out.

77
00:07:17,180 --> 00:07:17,960
‫as eleven.

78
00:07:18,770 --> 00:07:19,970
‫Eleven is more than eight.

79
00:07:20,210 --> 00:07:21,590
‫So we are going to buy the shirt.

80
00:07:24,140 --> 00:07:30,830
‫Similarly for the third shirt, which is not blue, full sleeved, cotton shirt, sum comes out to be six, which

81
00:07:30,830 --> 00:07:34,340
‫is less than eight, which means that we are not going to buy this shirt.

82
00:07:35,840 --> 00:07:42,530
‫Can, you know, see how Perceptron is deciding the output that whether you will buy a shirt or not?

83
00:07:44,420 --> 00:07:50,370
‫It is just multiplying the values of the feature with corresponding weight and checking the sum against

84
00:07:50,370 --> 00:07:51,320
‫the threshold value.

85
00:07:51,950 --> 00:07:56,350
‫If the sum is larger than the threshold, it gives one output.

86
00:07:56,660 --> 00:07:59,420
‫If it is smaller, then it gives other output.

87
00:08:00,950 --> 00:08:06,710
‫This is a very simple example which I have given to make you understand how a Perceptron is working.

88
00:08:07,400 --> 00:08:14,270
‫In reality, we solve much more complex problems in which we have numerous input variables and many

89
00:08:14,270 --> 00:08:14,990
‫conditions.

90
00:08:15,500 --> 00:08:18,490
‫We will get to them in the due course of the lectures.

91
00:08:19,940 --> 00:08:28,010
‫As you can see, a Perceptron requires these weights and this threshold value to give out an output.

92
00:08:29,540 --> 00:08:32,510
‫And how will Perceptron get devalues of these parameters?

93
00:08:33,920 --> 00:08:38,420
‫One way is we give the values, in which case it is not learning.

94
00:08:38,960 --> 00:08:48,230
‫It is simple programming the other ways learning where we provide de Perceptron with historical data

95
00:08:48,500 --> 00:08:52,460
‫of which shirts were selected and which shirts were rejected.

96
00:08:53,610 --> 00:08:55,970
‫And Perceptron decides the weight and

97
00:08:56,090 --> 00:09:04,910
‫threshold value, according to that previous data, by the way you can get different models, by changing

98
00:09:04,910 --> 00:09:05,510
‫weights and

99
00:09:05,550 --> 00:09:05,830
‫threshold

100
00:09:07,600 --> 00:09:17,990
‫For example, if you want to select a shirt, which is blue full sleeved and cotton only and no other

101
00:09:17,990 --> 00:09:18,650
‫combination.

102
00:09:19,660 --> 00:09:27,980
‫this set of weights and threshold ensures that. Try it out you will see only blue cotton full sleeve

103
00:09:28,040 --> 00:09:32,930
‫shirt will be selected and no other shirt will pass through.

104
00:09:35,750 --> 00:09:37,310
‫So that's about it.

105
00:09:38,540 --> 00:09:41,600
‫This is a basic introduction to the Perceptron.

106
00:09:42,080 --> 00:09:45,260
‫We will extend this idea of Perceptron in the next lecture.

