In this video, we'll learn what machine learning models are and how they can feed the data. Model is a function that can predict answers based on certain object features or attributes. For now, let's say it's a function or an algorithm. We will discuss what models look like a bit later. Let's consider a specific example. Let's say we want to predict apartment prices and we have three features: floor space, proximity to subway and location, the district where they're located. In this table, we have four apartments located in different Moscow districts. It won't take long to notice some consistent patterns, some correlations between the features and price. For example, the bigger the floor space, the higher the price. This is quite obvious. We can also see that the price also depends on location. An apartment in Khamovniki costs much more than one in Cheremushki. Let's try to build our first simple model. Let's suppose this is not true, but let's try this, that the price for an apartment depends on floor space only. We'll have a certain price for one square meter. The bigger the floor space, the higher the price. Here is what our model will look like. We have floor space, multiply it by 100,000 rubles and this will be our model's prediction. Let's see how this model works for our data. Well, it's not doing great. Its predictions for the first two apartments are okay. For observation 1, our model was correct in guessing that one square meter here costs 100,000 rubles. For option 2, our prediction is a bit too high. We got 10 million rubles, instead of nine million it actually costs, but it's okay. But for observations 3 and 4, it's a total miss. It's unlogical since the price depends on this district 2. Apartments 3 and 4 are located in expensive districts. In these districts, the price for one square meter is much higher. We will revisit this in a bit later. Now, let's consider another model that is a bit more complex. Until now, we have disregarded the distance to the subway, but logically speaking, the further away an apartment is from a subway station, the less it is likely to cost. Let's add another feature to our model; proximity to subway. For each kilometer further away from the subway, we will deduct one million. This is what our model looks like. We multiply the floor space by 100,000, multiply it by one million by the distance, the subway expressed in kilometers, then we had one million as a basic value to and from which we are going to add or subtract money. Let's see how it works. This model works a bit better. We can see that we correctly guessed the price for the first and second apartments. Now we know that the difference in price between options 1 and 2 has to do with proximity to subway. But we still have issues with our third and fourth apartment. Let's try to improve our model. Let's add another attribute, a tricky one. We have it in 1/3 line here. We will try to see if our apartment is located in central Moscow. If yes, we will take its floor space and multiply it by 300,000. What it means here is that one square meter in central Moscow costs 400,000 rubles instead of 100,000. All other attributes will remain the same. Now let's see how this model works. It works much better. It works perfectly for observation 1 and 2. It is much more accurate for apartments 3 and 4. We do have small permissible variations. For apartment 4, our variation is actually 10 million rubles, not so small, but still, it works way better than all our previous models. What have we been doing all this time? We have been adding various object features to our model, multiplying them by certain numbers, and putting all this together. Models like these are called linear models. The first thing we need to establish if we want to create a linear model is the features we want our model to include. We found that in this case, these features are floor space, proximity to subway, and an additional value that depends on central location multiplied by floor space. We have three features here. What we also have will coefficients supporting these features, 100,000 for floor space and so on. Where do we get this coefficients from? In our case, I just gave them to you. I prepared them in advance when I was working on my presentations to make sure that we can have good predictions. But in real life, you will have to use some data to work them out automatically, but we'll discuss that a bit later. Now, I only mention that these numbers are called model parameters. We will be changing these parameters to make sure our model works well, and to improve the quality of its prediction. The quality of prediction is largely depends on parameters. For example, if we change the location parameter to zero, the quality of our model will plummet. Our predictions for options 3 and 4 will be really bad. If we get rid of numbers, our model will look as follows. Floor space multiplied by a, plus distance to subway, multiplied by b plus central location, multiplied by c and by floor space and plus d. We have four parameters in our model: a, b, c, and d. We need to find the right values for these parameters so that our model can make high-quality predictions. We have learned that the machine learning model is something that can predict answers based on features or attributes. We want our model to make good predictions, to make sure it does, we need to work out certain parameters. If we are lucky enough to find adequate parameters, our predictions will be good.