Now, the simplest model that we can think of, that's capable of doing something like this, may have exactly one layer, and that layer is a layer of weights. So, we could write the mathematical function, as gestation weeks is weight zero times the mother's age plus weight one times the weight gain in pounds plus b, a constant that we will call the bias. And this may be the entire mathematical model, and you can see that we could probably adjust these weights, in such a way that, for any of the rows in the data, the gestation weeks that we get by applying this formula to the two columns, is as close as possible to the gestation week for that row. The other type of model besides the regression model, is the classification model. So, here, let's say we have a set of emails, and given an email, we want to say, "is this email spam or not spam?" The input is text, the text of the email, and the label, because we want to predict if it's spam or not, the label is whether a specific email is spam or not spam. So, you have some label data where you have a bunch of emails,and labels for those emails that tell you true or false, email is spam or not spam. And then, given this input and this label, that's our training data set, we then take our mathematical model, and change the weights of this mathematical model in such a way that given any of these inputs, the output is as close as possible to the label that we have. and what we will do here, is that we might say, not spam is a number zero, and spam is a number one, and we want our output to be as close to zero, or as close as possible to one for the first one. In the case of the gestation weeks problem, it's clear that we're basically taking the numbers, the mother's age is a number, weight gain in pounds is a number. And we're simply going ahead and making a computation, a weighted sum, and that's a mathematical model. But how does this work if the inputs or images are text? The answer, is that everything that goes into a machine learning model has to be made numeric. But how does it work for unstructured data? How can we do a weighted sum of an image. An image you can think of as a two dimensional array of pixels, and each pixel has a red, green, blue and alpha. So four numbers. So, what an image ultimately is, is that it's a three-dimensional array of numbers, a 1D array as vector, a 2D array as a matrix, a three dimensional-four dimensional array we don't have a good name for, in general, we call an n-dimensional array, a tensor. And that's where the name, Tensor Flow comes from. So, if you have an image, an image is a Tensor. What if you have text? How does the word duck become a number? That's a bit harder. So, what you would do, is that you would take any word and map it to be a vector. So, the word duck could be the numbers, 045034, that's great. So, we can just go ahead and assign arbitrary numbers to every word in the dictionary. But that's not ideal, it's not ideal because you would like to say that the vector representation of a word like plenty, and the vector representation of a word like many, and the vector representation of a word like much, all these three vector representations of plenty, many and much, they all need to be relatively close to each other, and they should be very different from the vector representation of a word like see. So, this itself, coming up with a good vector representation, turns out to be a machine-learning problem by itself. So, this problem of assigning an appropriate vector to appropriate words in a language is a machine learning problem, but fortunately it's being done before. So, if you have a machine learning problem where your input is going to be free form text, what you would do, is that you would go ahead and find one of these models. An example of this is called word2vec, a technique that converts words to vectors. Typically, there's a different word2vec for different languages. So, you would go ahead and pick one of those word2vec things, and you will use it to convert your text inputs into vectors. From then on, all you have are numbers and you go ahead and do your machine learning on those numbers. So, even though we are focusing primarily on structured data in this course, what you would do for things like images and what you would do for things like text, the concepts still apply. As it turns out though, the kinds of layers and the kinds of models and the kinds of tricks that you would do for images and text are different, which is why we have this whole 10-core specialization on machine learning. But in this course, we're going to stick to the basic concept of machine learning and applying it to structured data machine learning, which is the most common kind of data problem that you will face in most businesses. So, if you're going to be learning machine learning, let's learn it with unstructured data, because it tends to be the most useful. Now, if you have a classification model, the labels would be spam or not spam, and the output of the model will not be zero or one, the output of the model will be a number between zero and one, it will be a floating point number between zero and one. So, how do we interpret that number? What we do is, because we decide for spam was going to be one and not spam was going to be zero, we'll interpret that number as a probability, that if this probability is one, if it's 100% likely to be spam, and if the probability is zero, it is 100% likely to be not spam, and if it's a number between zero and one, the number is 0.8, then we say that it is 80% likely that this email is spam. So, we interpret the output of the model, this output that's between zero and one, we interpret it as a probability of it being, label equals one.