Code: Select all
like = r * log( logistic(score) ) + (1 - r) log( 1 - logistic(score) )
objective = 1/N Sum( -like )
Code: Select all
se = (r - logistic(score)) ** 2
objective = 1/N Sum ( se )
Moderator: Ras
Code: Select all
like = r * log( logistic(score) ) + (1 - r) log( 1 - logistic(score) )
objective = 1/N Sum( -like )
Code: Select all
se = (r - logistic(score)) ** 2
objective = 1/N Sum ( se )
Draws should be fine i think. Unless we have a score of -inf, inf, the logistic function should return scores between 0 and 1.How do you handle draws? Or does your evaluation function return W/D/L probabilities?
Maximum likelihood is the 'standard' method for logistic regression. Also i seem to get more stable iterations with it than minimzing the mse directly.But the real answer is that I don't need to penalize my evaluation function infinitely for getting one case wrong, which using logs would do.
The log-likelihood function you posted is not bounded. If my evaluation function predicts the probability of the result is 0, it gets an infinite penalty.Daniel Shawul wrote:Draws should be fine i think. Unless we have a score of -inf, inf, the logistic function should return scores between 0 and 1.How do you handle draws? Or does your evaluation function return W/D/L probabilities?
The evaluation score of my engine is between (-20000, 20000), and for a draw it would be score=0 or logistic(score) = 0.5. So draws are no problem as far as i can see.AlvaroBegue wrote:The log-likelihood function you posted is not bounded. If my evaluation function predicts the probability of the result is 0, it gets an infinite penalty.Daniel Shawul wrote:Draws should be fine i think. Unless we have a score of -inf, inf, the logistic function should return scores between 0 and 1.How do you handle draws? Or does your evaluation function return W/D/L probabilities?
I raised two separate objections. One of them is that, although using log-likelihood is somewhat theoretically motivated, it is not at all clear how draws should be handled.Daniel Shawul wrote:The evaluation score of my engine is between (-20000, 20000), and for a draw it would be score=0 or logistic(score) = 0.5. So draws are no problem as far as i can see.AlvaroBegue wrote:The log-likelihood function you posted is not bounded. If my evaluation function predicts the probability of the result is 0, it gets an infinite penalty.Daniel Shawul wrote:Draws should be fine i think. Unless we have a score of -inf, inf, the logistic function should return scores between 0 and 1.How do you handle draws? Or does your evaluation function return W/D/L probabilities?
Log-likelihood is a very natural quantity to maximize if you have a probability model. So if we had some procedure that produced a probability for winning, a probability for drawing and a probability for losing, it would make sense to penalize by the -log of the probability of the outcome that really happened. But the particular penalty you are using for a draw is not well motivated. Nothing will blow up, but what you are doing is not exactly maximizing likelihood.Daniel Shawul wrote:I don't really get what you are missing here -- again draws are not a problem as far as i can see.
Yes, it's a very common thing to optimize if what you are maximizing over are probability models. But, as I said, that's not exactly true here.The maximum-likelihood estimation can even be used to train neural networks (multiple layers) instead of a single layer evaluation function we are talking about here. Here is an example paper (http://pubmedcentralcanada.ca/pmcc/arti ... 4-0306.pdf ) where they show that backpropagation done with a maximum likelihood objective (ML-BP) is shown to be better than the least squares objective (LS-BP).