Error measure

Error measure (Error Measure)                                                

There are two error calculation methods:                                                                   

The first is called 0/1 mistake, as long as the forecast ≠ [target] believes that making mistakes is usually used for classification; usually choose the wrong larger value as the value of y~                                             

The second is called squared error, which measures the distance between the predicted and [target], typically used for regression. Usually selected, the mean error value as y~    

for example:    

There is also a known error, mean error err (y~, y) = | y~-y |, which is typically selected as the value close to 50% of the value y~    

Weighted error, and the error weighting model, wighted pocket Algorithm

0/1 errors are divided into two types, one is called the false reject the false rejection, that would have been legal recognition has become illegal; the other is called false accept called false acceptance, that would have been illegal recognition became legal.

For example: CIA's top-secret database can only open to those in authority, if the fingerprint identity verification personnel, the cost of false accept becomes very large, which means that a person does not have permission to contact a state secret! Can not tolerate ah, so the engineers give false accept a huge plus weight training if false accept occurs, this alternative basic function is to be banning federal funding.

It's wrong calculation becomes:

 This time it is necessary to add a weight Ein

 

Such false accept (identified as +1 to -1) weight is 1000, we all training data points marked as -1 copy 1000, if the approximated function mistake at these points, there will be 1000 times the penalty. This problem was transformed into unweighted problem:

 

And we already know that Pokect unweighted algorithm can solve the problem. In fact, in the application, we will not really put some data replication 1000, we only in the calculation of Error, the probability is high weight data can be visited 1,000 times increase, which is equivalent to copy.

However, if it is to traverse the entire test set (not sampling) to calculate the error, there is no need to modify the probability of a visit, just give appropriate error multiplied by their weights and then added up and divided by N can be. 

 wighted pocket Algorithm

Guess you like

Origin www.cnblogs.com/cmybky/p/11773130.html