I am studying classification using linear regression . Now, I want to map it in Bayesian regression. Let talk about binary classification using linear regression again.
Assume that I have a set $X=${$x_1,x_2...x_n$} and binary lable $y$={$0,1$}.
Binary classification using linear regression task can embedded in to minimum loss function, where: $h(x)=ax+b$ is linear regression line. $$L=\sum(h(x)-y)^2$$ It is very clear fomular and discussed in lecture note. Now I want to map it in Bayesian rule. Bayesian rule can express: $$\max(p(y=0;1\mid X,a,b))$$ We have: $$p(y=0;1\mid X,a,b)=p(X\mid y,a,b)\cdot P(X)$$ Hence, the loss function with Bayesian classification case are given $$L_{Bayesian}=\sum(p(X\mid y=1,a,b)\cdot P(X)-p(X\mid y=0,a,b)\cdot P(X))$$ Is the Bayesian's loss fomular correct? Thank you so much.