With the regression setting, we spoke about dealing with error rates, and the main way we assess a model with regression was the mean squared error or MSE. Now, if we're dealing with a situation where y_i are qualitative, something like a yes, no or anything that has steps to it instead of being continuous like in the regression setting, or a numeric like in the regression setting. We still want to assess the accuracy of this. Even when y_i is qualitative, we still need to be able to assess whether our model is good or not. If we have this general setup that we're normally given, x_1, y_1 through x_n and y_n. Again, this part is the important part here. We have a qualitative y_i, so the training error rate instead of an MSE, which we can't use here, we're going to want a training error rate. Up here we're going to have a test error rate and we'll get into more about a test error rate the next session or two. But here the training error rate is something that should be somewhat intuitive, which is essentially the proportion of mistakes when we apply our estimate to the training data. Here you'll see the equation for it, 1 divided by n as we normally do to get some type of average. Since y_i is qualitative, you can think about it as, just in a simple case let's take two step, a yes or no as our y_i. Y_i is now a yes or no, and in order to assess this we say, this is our estimate and this is the true. Again, this is training, so we have all this data so we can just compare them, and we say, we want to take the average. The 1 over n is something that helps us get the average and we want to sum the amount of times we make a mistake. If you haven't been exposed to this, this is called the indicator function, and what this does is, in general you're given an indicator function that might be something like this and then inside would be a statement. Again, this is if you haven't seen it, if you're familiar with the indicator function, that's great, sometimes it's written as. What this indicator function is saying is, if the statement inside is true, we're going to assign a 1, and if it's false, we're going to assign a 0. What this is saying is, for each time, this does not match, intuitively it saying for each time our estimate is wrong about whether it's a yes, no, in our example for y_i. Every time this is wrong, we're going to assign a 1, every time this is right, we're going to assign a 0. This will give us an indicator for, again, if it's wrong, they won't match, we'll get a one, and so we'll sum up the amount of times that our estimate is wrong, and then we'll take the average of that. That'll give us the proportion of mistakes using our function. What we want to do is we want to minimize this, we want the least amount of mistakes on our data. Again, for regression we have MSE, and for assessing accuracy per classification, we'll have this training error rate. Now. In this case, the analogy or bringing this from a training error rate to a testing error rate is the exact same formula, pretty much is the average of our indicator function, which is exactly what this is doing in the first place. Next time we'll go a little bit into what this test error rate means, and we'll break it down.