Now that you're familiar with the types of ML models available to choose from, high-quality data must be used to teach the models what they need to learn. The best way to learn the key concepts of machine learning on structured datasets is through an example. In this scenario, we'll predict customer lifetime value with a model. Lifetime value, or LTV, is a common metric in marketing used to estimate how much revenue or profit you can expect from a customer given their history, and customers with similar patterns. Will use a Google Analytics e-commerce dataset from Google's own merchandise store that sells branded items like t-shirts and jackets. The goal is to identify high-value customers and bring them to our store with special promotions and incentives. Having explored the available fields, you may find some useful in determining whether a customer is high-value based on their behavior on our website. These fields include customer lifetime page views, total visits, average time spent on the site, total revenue brought in, and e-commerce transactions on the site. Remember that in machine learning, you feed in columns of data and let the model figure out the relationship to best predict the label. It may turn out that some of the columns weren't useful at all to the model in predicting the outcome. You'll see later how to determine this. Now that we have some data, we can prepare to feed it into the model. Incidentally, to keep this example simple, we're only using seven records, but we'd need tens of thousands of records to train a model effectively. Before we feed the data into the model, we first need to define our data in columns and the language that data scientists and other ML professionals use. Using the Google merchandise store example, a record or row in the dataset is called an example, an observation, or an instance. A label is a correct answer and you know it's correct because it comes from historical data. This is what you need to train the model on in order to predict future data. Depending on what you want to predict, a label can either be a numeric variable, which requires a linear regression model, or a categorical variable, which requires a logistic regression model. For example, if we know that a customer who has made transactions in the past and spends a lot of time on our website, often turns out to have high lifetime revenue, we could use revenue as the label and predict the same for newer customers with that same spending trajectory. This means forecasting a number. We can use the linear regression as a starting point to model. Labels could also be categorical variables like binary values, such as high-value customer or not. To predict a categorical variable. If you recall from the previous section, you need to use a logistic regression model. Knowing what you're trying to predict, such as a class or a number, will greatly influence the type of model you'll use. But what do we call all the other data columns in the data table? Those columns are called features or potential features. Each column of data is like a cooking ingredient you can use from the kitchen pantry. Too many ingredients, however, can ruin a dish. The process of sifting through data can be time-consuming. Understanding the quality of the data in each column, and working with teams to get the most features or more history is often the hardest part of any ML project. You can even combine or transformed feature columns and a process called feature engineering. If you've ever created calculated fields and you've already executed the basics of feature engineering. Also, BigQuery ML does much of the hard work for you. Like automatically one-hot encoding categorical values. One-hot encoding is a method of converting categorical data to numeric data to prepare it for model training. From there, BigQuery ML automatically splits the dataset into training data and evaluation data. Finally, there is predicting on future data. Let's say new data comes in that you don't have a label for. You don't know whether it's for a high-value customer, you do, however, have a rich history of labeled examples for you to train a model on. If we train a model on the known historical data and are happy with the performance, then we can use it to predict our future datasets.