Loss function and Regression in Real World Data For Regression problem and loss function. It has a y(x) and t(target) variables.
$$L(t_y(x)) = (y(x)-t)^2$$
in real world. what is the target variable represent?
If you collect the data. How do you expect some target value?
I have a trouble to under stand what is target variable in real world.( How you expect some target value from unknown dataset?) Maybe i misunderstand about something in regression problem. Can anyone give some examples with find the expectation loss?
 A: You math notation is less clear and can be improved. For example, what is the difference between $t_y(x)$ and $y(x)$? $y$ is a function or response variable?
I will start to introduce the notation in classical way from beginning.
In regression setting, we are predicting a continuous variable. For example, we have a person's weight, and we want to predict a person's height based on he/she's weight. Then the height is the target variable.
Suppose you collected 100 persons' data, and the data is in pairs. For each person, you will have a height and weight value. I am making up first 3 data points here. Let's assume weight is in kg and height is in cm.
1st data point: (60kg, 170cm)
2nd data point: (65kg, 175cm)
3rd data point: (80kg, 180cm)
...
100th data point: (70kg, 181cm)

Now, let's use $x$ to represent your "feature" or "independent variable", and use $y$ to represent "target" or "dependent variable". In addition, we use subscript $i$ to represent $i^{th}$ data point. In such setting $x_1=60$, $y_1=170$, $\cdots$.
Our goal is to predict height "accurately", but how to measure "accuracy"? We can use squared loss, where we use $\hat y_i$ to represent predicted value on $i^{th}$ data. Suppose we have 100 data points in total, we want minimize this Loss for all data. So we are summarizing from $1$ to $100$.
$$\sum_{i=1}^{100}(y_i-\hat y_i)^2$$
Now, one step further, where does $\hat y_i$ comes from? It comes from a function of your "independent variable" $x_i$. So, $\hat y=f(x_i)$, then the equation becomes
$$\sum_{i=1}^{100}(y_i-f(x_i))^2$$
Which is squared loss on your whole data set for regression setting.
