Machine learning algorithms commonly used auxiliary function formula

1. go dimensionless

   Standardization: X = (X-min (X)) / (max (X) -min (X)) Features: susceptible to the influence of extreme values, extreme values need to be removed.

 Normalization: z-score = (x- mean) / standard deviation Features: from extreme value of the impact, but large amount of calculation

2. Helper

  Sigmoid function:. 1 / (. 1 + E the -X- probability) of occurrence    . 1 / (. 1 + E the -X- ) probability does not occur      

  Weight of evidence (WOE value): woe (X I ) = LN (B . 1 / B Total ) / (G . 1 / G Total ) where: x = a characteristic B . 1 = X wherein the sample good customer in a group of number G . 1 = number of samples of a set of x bad customer features.

  Information Value (IV value): IV I(B . 1 / B Total ) - (G . 1 / G total) * woe (X I after) the values obtained for each group IV, IV all variable values are added to give the whole IV value of X.

                       Features: then equation B . 1 or G . 1, any number of samples can not be set to 0, whether the person or IV value = -∞ ∞ meaningless.

                         In general: no ability to predict the low ← 0.03 ← → 0.09 ← → 0.29 ← in high high → 0.49 →

 


 

 3. The model equations

Scorecard calculation equation:      odds of good user probability (p) and the bad ratio user probability (1-p) of.

 


                           Scorecard score scale can be set by the score is expressed as a ratio to define the number of existing expressions. Formula is as follows:

 

                            A total score = + B * LN (odds)

              Conversely:       odds to bad user probability (p) and the good ratio of the probability of the user (1-p) of.

                Then:      Score Total A = - B * LN (odds)

    In the second equation, for example:      wherein, A and B are constants. Negative sign in the formula may be such that the lower the probability of default, the higher the score. Typically, this is the ideal direction of change scores, low scores on behalf of that is high-risk, high scores on behalf of low-risk. Calculating a ratio logistic regression model is as follows: 

 

                                               

 

                                                 Wherein the modeling parameters used to obtain the model parameters can be fit model β0, β1, ..., βn.

 

                            Wherein the constants A, value B can be obtained by two known or assumed value into calculated.

 

                            First, we need to set two assumptions:

 

                            (1) a specific ratio to set a specific expected value;

                           (2) determine the ratio of double score (PDO) Based on the above analysis, we first assume that the ratio of x value for a particular point P. The ratio of the point score of 2x P + PDO. Substituted into the formula, the following two equations can be obtained:

 

                                    

                             Solutions A and B are two constants above equations can be obtained :

                                           B=PDO/log(2)
                                           A=P+Blog(x)
                         So that the set scale ratio scorecard {1:20} score at (normal default ratio) was 50 minutes, 10 minutes of the PDO, obtained by substituting into the equation: B = 14.43, then the calculated value of A = 6.78     It can be expressed as:

 

 

                                  

 

                             After scorecard scale parameters A and B is determined, the ratio can be calculated and the probability of default, and the corresponding score. The constant A is usually referred to as compensation, referred to as the constant B scale. The scores of the card can be expressed as:

 

                                                  

 

                             If variables x1 ... xn taken WOE different row and calculated values, standard score card format, the base represented by the formula equal value (A-Bβ0); score distribution due minus sign in the equation, the model parameters β0, β1, ... , βn should also be negative; the j-th row of the variable value xi depends on the following three values:

 

                                                      

 

 


  Matrix least-squares regression equation :( request)

                    = W is (X- T * X-) -1 * X- T * the Y wherein: X- T indicates transposition    (X- T * X-) -1  represents an inverse matrix    

     Ridge regression matrix equation:   

                    = W (X- T * X-+ aI) -1 * X- T * where a is the Y Custom parameters, I is the identity matrix

     Gradient descent matrix equation: [theta] = [theta] [Sigma] X- T (the Y-X-* [theta]) / m [theta] where σ is the learning rate factor is assumed (step)

    Gradient descent logistic regression:  [theta] = [theta] [Sigma] X- T ( the Sigmoid * ( X-* [theta]) -Y) / m

 


 

 

To be continued -----
                                              

 

Guess you like

Origin www.cnblogs.com/Koi504330/p/11921078.html