# What loss function can I use for linear classification?

I have a question about loss function in bayes classification. Let see similar case of loss function in linear classification: Given data $(x,y)=${$(x_1,y1)....(x_n,y_n)$} is map to label $T=${-1,1}. The loss function of that method is given by $$L=\sum(y-T)^2$$ How about if I use bayes classification,which is loss function of that method?Thank you so much http://en.wikipedia.org/wiki/Naive_Bayes_classifier

-

For probabilistic classifiers in general, not only Naive Bayes, one first starts with a model and then fits the model to the data. What does "fitting" mean?. You assume that the data is generated by the distribution (the model). All assumptions you make about your data are reflected in that model.

You then look for the parameters which correspond to the particular distribution which is most likely to have generated the training data. See this chapter by Thom Mitchell which explains it in clear terms, and compares it to logistic regression.

So what is the loss function you use?. The likelihood of the data for the given model. Please refer to the Wikipedia site on Naive Bayes for several examples. It is a measure of likely it is, that the data has been generated by the given model. The canonical form given in that site for the likelihood (for a given sample $(F_{1}, ... , F_{n})$) is,

$$L = P(C)\prod_{i}P(F_{i}|C)$$

-
This is of course a minor comment, but technically the loss function is not "the likelihood of the data for the given model" but the "negative likelihood of the model parameters for the given data" (minimizing loss = maximizing likelihood). –  user023472 Jul 15 at 15:58
Could you give some example for bayes loss function? –  user8264 Jul 15 at 16:41
In this document inf.ed.ac.uk/teaching/courses/inf2b/learnnotes/… there is a nice derivation of the naive bayes algorithm for document classification –  juampa Jul 15 at 20:36