0
$\begingroup$

In this lecture, starting from first minute, there is an example of features for housing application. Let's say number of features is 1. I understand why lowest error indicates better model, but why lowest error indicates a better model in this case? A feature is just a number, so if for example #bedrroms=1 and #bathrooms=1, so the RSS value should be the same when I use #bedrroms feature or #bathrooms feature, right? And if those features have different values, I'll get different RSS values. But, does this mean that the lowest is better? I hope I explained myself well.

$\endgroup$
1
$\begingroup$

A feature is just a number, so if for example $\#bedrroms=1$ and $\#bathrooms=1$, so the RSS value should be the same when I use #bedrroms feature or #bathrooms feature, right?

A feature can be of various types, but for the two that you mentioned let's assume they are integers. We consider instances, i.e. data points, that have a certain feature value associated to it.
For example, we have an instance from our data set of house prices, and an instance has the feature values $\#bedrooms=1$ and $\#bathrooms=1$. If we were to only consider this one instance for training our model, you are right in expecting that selecting any one of them will result in the same RSS. However, we're not just considering one instance, but many, and in most cases they have different values for different features.

In the example of the housing prices data set, we have many different houses that have different number of bed- and bathrooms, among other features, as well as a target value associated to it that we want to predict using a regression model, for example the price per m². The 'best' feature is not one with the lowest value, but rather one that helps most in predicting the target value based on it.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.