1
00:00:08,110 --> 00:00:12,370
Hey guys what's going on this is Caleb with Dev slopes and in this video we're going to be talking about

2
00:00:12,370 --> 00:00:13,420
machine learning.

3
00:00:13,420 --> 00:00:19,410
We're going to just kind of do a brief umbrella discussion about machine learning at large.

4
00:00:19,410 --> 00:00:25,960
Before we dive into the code and actually start using Core M-L in our apps First we need to understand

5
00:00:26,140 --> 00:00:27,980
what is machine learning.

6
00:00:28,000 --> 00:00:33,270
We also are going to talk a bit about how it works and why should we be using machine learning.

7
00:00:33,380 --> 00:00:34,180
OK what's the point.

8
00:00:34,180 --> 00:00:35,470
Why why should we do it.

9
00:00:35,680 --> 00:00:42,760
But first let's go and just talk about what is machine learning machine learning is basically a way

10
00:00:42,790 --> 00:00:51,070
that our programs that are applications can learn from various data that's been passed into our application

11
00:00:51,490 --> 00:00:54,200
and then make predictions based on that information.

12
00:00:54,280 --> 00:01:01,090
In the example of the app that you'll build in this course we use core M-L we use machine learning to

13
00:01:01,090 --> 00:01:04,660
classify information that comes in through a photo.

14
00:01:04,840 --> 00:01:09,020
Then our our model which we'll talk about the trained model later.

15
00:01:09,190 --> 00:01:12,760
Basically the model is going to take that input data as a photo.

16
00:01:12,910 --> 00:01:19,090
It will analyze patterns it can see in the photo and then it can use that information to make a prediction

17
00:01:19,510 --> 00:01:21,250
based on what it already knows.

18
00:01:21,400 --> 00:01:22,800
So that's pretty cool.

19
00:01:23,110 --> 00:01:26,590
A definition I really like of machine learning is right here.

20
00:01:26,660 --> 00:01:27,120
OK.

21
00:01:27,220 --> 00:01:30,670
And it's pretty vague but I'm going to go into detail about it later.

22
00:01:30,670 --> 00:01:37,760
Machine learning gives computers the ability to learn without being explicitly programmed.

23
00:01:37,780 --> 00:01:44,340
So I did not have to write the code to tell my app how to identify a remote or a window or an umbrella.

24
00:01:44,530 --> 00:01:46,530
I didn't have to tell it to do that.

25
00:01:46,720 --> 00:01:48,670
I used a pre-trained model.

26
00:01:48,670 --> 00:01:50,190
Think of that like a brain.

27
00:01:50,300 --> 00:01:55,900
K. when you are a baby you have a brain obviously but it's still developing it's still learning and

28
00:01:55,900 --> 00:01:56,750
growing.

29
00:01:56,770 --> 00:02:01,590
So you need to have experiences you need to be exposed to different kinds of information.

30
00:02:01,600 --> 00:02:02,890
You need someone to teach you right.

31
00:02:02,890 --> 00:02:05,740
Maybe your parents teach you oh this is hot.

32
00:02:05,770 --> 00:02:06,970
Don't touch the stove.

33
00:02:06,970 --> 00:02:11,980
They tell you that it's hot and you probably know that but you don't understand and don't experience

34
00:02:11,980 --> 00:02:13,240
it until you touch the stove.

35
00:02:13,270 --> 00:02:14,270
Wow that's hot.

36
00:02:14,380 --> 00:02:18,520
And you make that connection in your brain a pre-trained model is kind of like that.

37
00:02:18,640 --> 00:02:19,040
OK.

38
00:02:19,120 --> 00:02:25,480
Data scientists are kind of like parents in a way because they train these these machine learning models

39
00:02:25,810 --> 00:02:29,270
to understand information and to classify it.

40
00:02:29,350 --> 00:02:32,610
So it's exposed to a lot of different kinds of information.

41
00:02:32,740 --> 00:02:39,210
Maybe the data scientists expose their model to hundreds of different pictures of TV remotes.

42
00:02:39,340 --> 00:02:46,300
So that the model can identify OK when I see a shape that's about this size that has a bunch of square

43
00:02:46,300 --> 00:02:51,460
buttons in a certain grid an order with different colors it knows to classify that and observe those

44
00:02:51,460 --> 00:02:56,280
patterns and then based on that it can make a prediction with a certain level of confidence.

45
00:02:56,370 --> 00:02:57,970
OK that's really cool.

46
00:02:57,970 --> 00:03:05,400
Now basically the computer has been trained it's learned what makes a remote What makes an umbrella

47
00:03:05,680 --> 00:03:09,310
and based on its experience and what it's learned it's able to make a prediction.

48
00:03:09,400 --> 00:03:11,110
Very very cool.

49
00:03:11,110 --> 00:03:16,780
This technology of computers being able to learn without being explicitly programmed is pretty incredible

50
00:03:16,780 --> 00:03:22,420
in my opinion and the implications of how machine learning could change the world and are changing the

51
00:03:22,420 --> 00:03:26,620
world go beyond just simple apps that classify photos.

52
00:03:26,620 --> 00:03:32,470
Doctors are using machine learning to identify and diagnose certain diseases.

53
00:03:33,430 --> 00:03:38,710
It could even be used for like relationship stuff it can be used to identify patterns and habits maybe

54
00:03:38,710 --> 00:03:41,290
for like relationship or matchmaking.

55
00:03:41,290 --> 00:03:49,170
It can be used to analyze very expensive and costly manufacturing procedures like will this engine work

56
00:03:49,180 --> 00:03:54,350
or will a certain part fail it can make predictions based on how it has been trained.

57
00:03:54,340 --> 00:03:59,320
KAYE there's lots of very cool ways in the real world that machine learning could be used.

58
00:03:59,530 --> 00:04:00,270
OK.

59
00:04:00,310 --> 00:04:05,750
There are a couple different ways that machine learning works and now we're into the how does it work.

60
00:04:05,770 --> 00:04:06,910
Part of this video.

61
00:04:07,180 --> 00:04:13,690
So there is something called supervised machine learning where basically when the model is being trained

62
00:04:14,110 --> 00:04:20,530
the data scientists or whomever is programming it they might show it a picture of a dog and say OK this

63
00:04:20,530 --> 00:04:21,200
is a dog.

64
00:04:21,310 --> 00:04:27,130
And the model knows OK that's a dog great then it might show a photo of a cat and say OK this is not

65
00:04:27,130 --> 00:04:27,780
a dog.

66
00:04:27,940 --> 00:04:28,530
All right.

67
00:04:28,600 --> 00:04:30,130
And so then the model can tell.

68
00:04:30,130 --> 00:04:32,490
OK this is a dog this is not a dog.

69
00:04:32,520 --> 00:04:39,210
Now the issue though is that supervised M-L requires a lot of human input to verify that the model is

70
00:04:39,310 --> 00:04:40,970
is doing it correctly.

71
00:04:40,990 --> 00:04:41,530
OK.

72
00:04:41,880 --> 00:04:46,620
OK so since the model is being supervised the human is saying yep that's a dog.

73
00:04:46,630 --> 00:04:47,040
OK.

74
00:04:47,080 --> 00:04:48,460
This is not a dog.

75
00:04:48,490 --> 00:04:49,500
This is a cat.

76
00:04:49,510 --> 00:04:50,290
This is a dog.

77
00:04:50,290 --> 00:04:51,620
This is the dog.

78
00:04:51,700 --> 00:04:59,230
The model can learn and identify patterns and then based on that in the future it can classify new data

79
00:04:59,230 --> 00:05:04,630
it receives and make a prediction based on what it has already seen of cats and dogs it could analyze

80
00:05:04,630 --> 00:05:11,120
the photo and realize OK so some eggs are very big Some dogs are very small but most cats are about

81
00:05:11,120 --> 00:05:12,190
the same size.

82
00:05:12,190 --> 00:05:12,790
OK.

83
00:05:12,980 --> 00:05:17,350
A cat has a smaller nose than most dogs and a dog has a bigger nose than most cats.

84
00:05:17,350 --> 00:05:21,500
So based on those patterns it can see in the photo it can make predictions.

85
00:05:21,500 --> 00:05:22,640
Very cool.

86
00:05:23,570 --> 00:05:29,960
Be unsupervised machine learning there's also unsupervised machine learning and based on some inherent

87
00:05:29,960 --> 00:05:36,620
characteristics of those images passed in the model can start to identify patterns and make its own

88
00:05:36,620 --> 00:05:39,030
predictions in its own classifications.

89
00:05:39,040 --> 00:05:40,860
Kate that's very very cool.

90
00:05:41,090 --> 00:05:46,850
And there are of course a couple of different ways that data is structured in machine learning models

91
00:05:46,880 --> 00:05:52,760
but most of the time it will be structured in either a decision tree where basically one decision yes

92
00:05:52,760 --> 00:05:57,140
or no lead you to another part of the tree yes or no lead you to another part of the tree and so on

93
00:05:57,140 --> 00:06:02,310
and so forth until it can make a prediction with a fairly high level of confidence.

94
00:06:02,330 --> 00:06:09,610
Beyond that there are artificial neural networks which basically connect data that is similar or related

95
00:06:09,780 --> 00:06:15,980
case similar to how our brain works with different synopses and different nodes in our brains for creating

96
00:06:15,980 --> 00:06:20,990
thoughts and memories and artificial neural network works just like that where it makes connections

97
00:06:20,990 --> 00:06:25,970
and it makes observations based on patterns and related data that it already knows about.

98
00:06:26,030 --> 00:06:26,720
Very very cool.

99
00:06:26,720 --> 00:06:31,730
Those are just two common ways that data is structured for a machine learning model.

100
00:06:31,970 --> 00:06:36,110
And now we should talk about why use machine learning in our apps what's the point.

101
00:06:36,110 --> 00:06:37,210
Why should I use this.

102
00:06:37,370 --> 00:06:42,680
And I'm going to tell you the number one reason is that it makes it easy for you to personalize your

103
00:06:42,680 --> 00:06:44,570
app for your user.

104
00:06:44,570 --> 00:06:50,780
If you integrate machine learning you can add features to your app that pay attention to what your user

105
00:06:50,780 --> 00:06:54,420
does and make suggestions and predictions based on that.

106
00:06:54,560 --> 00:07:01,580
If you've ever shopped on Amazon.com you know when things pop up that say recommended for you or based

107
00:07:01,580 --> 00:07:04,320
on this we think you might like this other product.

108
00:07:04,460 --> 00:07:09,530
It uses a bunch of data from people buying things all over the Internet and then based on what other

109
00:07:09,530 --> 00:07:14,280
people have purchased it can make a recommendation to you because of your shopping habits.

110
00:07:14,390 --> 00:07:19,250
It finds people like you that buy things like you and recommends things that you might like that's machine

111
00:07:19,250 --> 00:07:19,970
learning.

112
00:07:19,970 --> 00:07:26,240
OK there's lots of great applications for this to make your apps tailored specifically to your user.

113
00:07:26,240 --> 00:07:30,110
The coolest thing is that machine learning is easy and available to use.

114
00:07:30,110 --> 00:07:32,770
Now for iOS Yes that's what we're going to learn in this course.

115
00:07:32,810 --> 00:07:34,340
And it's so cool.

116
00:07:34,340 --> 00:07:39,710
So let's go ahead let's stop talking about machine learning at large and let's dive into core Armel

117
00:07:39,740 --> 00:07:40,810
for iOS.

118
00:07:40,880 --> 00:07:42,500
We'll see in the next video.
