from where the error in target variable comes in linear regression For linear regression, one assumption is that the target variable Y has an underlying linear relationship with features (X1, X2, . . . , Xd), modified by some error term ε that follows a zero-mean Gaussian distribution. I do not understand from where the error term comes. If Y IS the target/true label, then how there can be error in it? Is it introduced because of noise in observation?
Or it means the relationship between Y and the features is not exactly linear, hence linearity assumption introduces some errors?
 A: The classic linear regression model is:
$$ y_i = \beta_0 + \beta_1 x_{i,1} + \ldots + \beta_k x_{i,k} + \epsilon_i$$
The error term captures everything else that's going on besides a linear relation ship with $x_1$ through $x_k$! An entirely equivalent way to write the linear model that may be instructive is:
$$ \epsilon_i = y_i - \left(\beta_0 + \beta_1 x_{i,1} + \ldots + \beta_k x_{i,k}\right) $$
From this, you can get a sense of where linear regression can go wrong. If $\epsilon_i$ has stuff going on such that If $\mathrm{E}\left[\epsilon_i \mid X \right] \neq 0$, then strict exogeneiety is violated and the regressors and the error term are no longer orthogonal. (Orthogonality of the regressors and the error term is what gives rise to the normal equations, to the OLS estimator $\hat{\mathbf{b}} = \left(X'X\right)^{-1} X'\mathbf{y}$.) 
Think of the error term as a garbage collection term, a term that collects EVERYTHING ELSE that's going on besides a linear relationship between $y_i$ and your observed regressors $x_1, \ldots, x_k$. What could end up in the error term is limitless. Of course, what's allowed into the error term for OLS to be a consistent estimator isn't limitless :P.
A: Both classification and (linear) regression can be viewed as a supervised learning problem. Given some data (if you want call it "training data" for classification or "observations" for regression) $(x_1, y_1), \dots, (x_n, y_n)$ we have for:


*

*Classification: $x_i$ are inputs and $y_i$ are true class labels.

*Regression: $x_i$ are data points and $y_i$ are target values (values that are usually noisy coming from measurements, you can even call them measurements or observations if the term target confuses you, I think we call it target just because it's the thing we want to get).


The task in supervised learning is to find a mapping function or rule $f$ between the $x_i$ and $y_i$ such that:


*

*Classification: for a new input $x_n$, $f$ finds its corresponding class $y_n$ using $y_n = f(x_n)$.

*Regression: for a new data point $x_n$, $f$ predicts its target value using $y_n = f(x_n) + \epsilon$ i.e. defining a mapping and taking into account the noise $\epsilon$.


The difference comes from the fact that for classification we know the true classes' labels so we affect the new input to one of the classes (from a discrete set) whereas for regression we have target values that are in the real set and since we can't define a true target value (what value will you choose from the real set values?) we define a mapping $f$ that defines more or less the tendency according to the values of our observations, and add the noise to account for the possible deviation from the mapping function.
For more insights about this refer to:
https://www.youtube.com/watch?v=WpxK__SK2a0&index=2&list=PLD0F06AA0D2E8FFBA
