Abstract:
A data analysis system is invented to analysis business data. The analysis process is regulated to increase accuracy.

Description:
CROSS REFERENCE TO RELATED APPLICTIONS 
       [0001]    The present application is related to, and claims priority of, provisional patent application, entitled: “A Regulated Data Analysis System”, with Ser. No. 61/392035, filed on Oct. 12, 2010. The provisional patent application is hereby incorporated by reference in its entirety. 
     
    
     DESCRIPTION 
       [0002]    A data analysis system is invented. In one embodiment of the invention, the system includes a computer (in some embodiments one or more computers, computer clusters, can be used). The computer stores data so that business related analysis can be performed. 
         [0003]    For example, in one embodiment, an online store has user profile data including age, gender, location, income range etc. It also has user&#39;s history about user past behavior, such as what website it visited, what advertisement it clicked and what product did the user buy. The store might use the user&#39;s data to predict user&#39;s future behavior (target variable), such as what product the user is likely to buy. 
         [0004]    For each user, a row vector (called feature vector) is constructed from user&#39;s profile data and behavior data. The elements in the feature vector are in digital format(integers or doubles etc). The elements can be the original data or derived data. For example, one possible vector can be: [age (integer), gender==male (binary, 1 or 0), income (double), located in a big city(binary), time since last bought something (double), looked at some advertisement about TV last month and with estimated income &gt;100K$/year(binary)] 
         [0005]    The target variable can be the probability that a user is going to buy a TV. 
         [0006]    The feature vector can have many items in some embodiments it might have thousands or millions of items. In general the items are selected so that they might have some relationship with the user behavior that is being estimated. From the historical data that users bought TV or not in the past, an analysis method (will be shown later) is used to estimate a user is going to buy a TV or not in the future. 
         [0007]    For another example, in another embodiment, the system is built to estimate the probability that an email is spam. The feature vector can be built from the words used in the email. One can collect a lot of emails and label them either sam or not by inspecting them. All the words used in the email is collected and sorted. The feature vector contains elements that representing the frequencies that each used word used in each individual email. For example, the first element of the feature vector is the frequency of the first word accord in each email. The feature vector elements may also include combination of words. For example: when both ‘free’ and ‘award’ accords in the email. Similarly to the above example, the feature vector elements can be any thing that might be related to the target variable (an email is spam). 
         [0008]    For notation, denote the matrix formed by the feature vector x and denote the vector of the target variables y. 
         [0009]    In general the analysis problem to be solved is to find a math model as function of a to predict y. 
         [0010]    There are many different models can be used for example linear regression, logistic regression etc. However, since there can be many elements in each feature vector, math model might be over-trained during the model training(developing) process. As result, the model can predict the known target variable (for example the historical user behavior) well but cannot predict what happen in real world. 
         [0011]    In some embodiments regulations to model parameters can be added to reduce over training problem. 
     
    
       [0012]    In a preferred embodiment, overall complexity of whole system, including the model, the parameters, and the target variable is used as the regulation metric. The model is selected so that this metric is the minimum. The minimum can be found be solving an optimization problem. In some embodiments, the global optimal solution of the optimization problem may be hard to find. In such cases, local optimal solution (where the regulation metric&#39;s derivative equals or close to zero) might be used instead. 
         [0013]    The model is denoted as 
         [0000]      m(x|a) 
         [0000]    where a is a set of parameters used in model m. 
         [0014]    The overall complexity of the whole system is denoted as 
         [0000]        K ( y, x, a )= Z ( y|m ( x|a ))+ Q ( a )+ O ( m ) 
         [0015]    where Z(y|m(x|a)) is the data complexity, i.e. number of bits needed (most time, on average) to describe the data when m(x|a) is known; Q(a) is the coefficient complexity, i.e. the number of bits needed to describe the coefficients; O(m) is the complexity of the model itself, a small constant for most applications. 
         [0016]    The optimal model is constructed by solving optimization problem 
         [0000]      min a K(y,x,a) 
         [0017]    Data complexity Z(y|m(x|a) can be calculated by log likelihood. 
         [0018]    When the target variable is a probability function p (its estimate, i.e. the model&#39;s estimate, is {circumflex over (p)}(y,x,a)), its log likelihood is denoted as: 
         [0000]        L =Σlog({circumflex over ( p )}( y,x,a ))
 
         [0000]      and  Z ( y|m ( x|a ))=− L  
 
         [0019]    When the target variable is continuous f (its model&#39;s estimate is denoted as {circumflex over (f)}(y,x,a)), for example in linear regression the log likelihood is denoted as 
         [0000]    
       
         
           
             L 
             = 
             
               
                 ∑ 
                 i 
               
                
               
                 log 
                  
                 
                   ( 
                   
                     
                       f 
                       ^ 
                     
                      
                     
                       ( 
                       
                         
                           y 
                           i 
                         
                         , 
                         x 
                         , 
                         a 
                       
                       ) 
                     
                   
                   ) 
                 
               
             
           
         
       
     
         [0020]    The data complexity Z(y|m(x|a))=−L+a constant. 
         [0021]    Hence, for both continuous and discrete variable maximum likelihood methods, the overall complexity becomes 
         [0000]        C=−L+Q ( a )+ O ( m ) 
         [0022]    where Q(a) is the coefficient complexity. 
         [0023]    One way to calculate the coefficient complexity, Q(a), is. 
         [0000]    
       
         
           
             
               Q 
                
               
                 ( 
                 a 
                 ) 
               
             
             ≈ 
             
               
                 
                   ∑ 
                   
                     
                       a 
                       i 
                     
                     ≠ 
                     0 
                   
                 
                  
                 
                   log 
                    
                   
                     ( 
                     
                       n 
                       a 
                     
                     ) 
                   
                 
               
               + 
               1 
               + 
               
                 
                   log 
                    
                   
                     ( 
                     
                       
                          
                         
                           a 
                           i 
                         
                          
                       
                       
                         ε 
                         i 
                       
                     
                     ) 
                   
                 
                  
                 w 
               
             
           
         
       
     
         [0024]    where n a  is the number of terms in a. ε i  is the allowed error, i.e. resolution, of a i . 
         [0025]    The vector of allowed errors is denoted as e. 
         [0026]    Hence, the overall complexity becomes: 
         [0000]        C=−L ( y, x, a, e )+ Q ( a, e )+ O ( m ) 
         [0027]    The model can be built by solving optimization problem 
         [0000]    
       
         
           
             
               min 
               
                 a 
                 , 
                 e 
               
             
              
             C 
           
         
       
     
         [0028]    This problem can be solved using standard optimization techniques. 
         [0029]    When e is small there is one efficient way of solving this optimization problem 
         [0000]    
       
         
           
             
               δ 
                
               
                   
               
                
               
                 L 
                 
                   ε 
                   i 
                 
               
             
             = 
             
               
                 
                   ε 
                   i 
                 
                  
                 
                   
                     ∂ 
                     L 
                   
                   
                     ∂ 
                     
                       a 
                       i 
                     
                   
                 
               
               + 
               
                 
                   ε 
                   i 
                   2 
                 
                  
                 
                   
                     
                       ∂ 
                       2 
                     
                      
                     
                       ( 
                       L 
                       ) 
                     
                   
                   
                     ∂ 
                     
                       a 
                       i 
                       2 
                     
                   
                 
               
             
           
         
       
     
         [0030]    since when L reaches maximum 
         [0000]    
       
         
           
             
               
                 ∂ 
                 L 
               
               
                 ∂ 
                 
                   a 
                   i 
                 
               
             
             ≈ 
             0 
           
         
       
     
         [0031]    denote 
         [0000]    
       
         
           
             
                 
             
              
             
               
                 I 
                  
                 
                   ( 
                   
                     a 
                     i 
                   
                   ) 
                 
               
               = 
               
                 - 
                 
                   
                     
                       ∂ 
                       2 
                     
                      
                     
                       ( 
                       L 
                       ) 
                     
                   
                   
                     ∂ 
                     
                       a 
                       i 
                       2 
                     
                   
                 
               
             
           
         
       
       
         
           
             
                 
             
              
             
               ? 
             
           
         
       
       
         
           
             
               ? 
             
              
             
               indicates text missing or illegible when filed 
             
           
         
       
     
         [0032]    as the Fisher&#39;s information of a i . 
         [0033]    When a is fixed ε i &#39;s contribution to overall complexity change can is 
         [0000]    
       
         
           
             
               δ 
                
               
                   
               
                
               
                 
                   C 
                   
                     a 
                     i 
                   
                 
                  
                 
                   ( 
                   
                     ε 
                     i 
                   
                   ) 
                 
               
             
             = 
             
               
                 
                   - 
                   
                     ε 
                     i 
                   
                 
                  
                 
                   
                     ∂ 
                     L 
                   
                   
                     ∂ 
                     
                       a 
                       i 
                     
                   
                 
               
               - 
               
                 
                   ε 
                   i 
                   2 
                 
                  
                 
                   
                     
                       ∂ 
                       2 
                     
                      
                     L 
                   
                   
                     ∂ 
                     
                       a 
                       i 
                       2 
                     
                   
                 
               
               - 
               
                 log 
                  
                 
                   ( 
                   
                     ε 
                     i 
                   
                   ) 
                 
               
             
           
         
       
     
         [0034]    to minimize it, 
         [0035]    we would like to have 
         [0000]    
       
         
           
             
               
                 
                    
                   δ 
                 
                  
                 
                     
                 
                  
                 
                   C 
                   
                     a 
                     i 
                   
                 
               
               
                  
                 
                   ε 
                   i 
                 
               
             
             = 
             0 
           
         
       
     
         [0036]    Hence, 
         [0000]    
       
         
           
             
               ε 
               i 
             
             = 
             
               1 
               
                 
                   2 
                    
                   
                       
                   
                    
                   
                     I 
                      
                     
                       ( 
                       
                         a 
                         i 
                       
                       ) 
                     
                   
                 
               
             
           
         
       
     
         [0037]    and 
         [0000]      δ C   a     i   (ε i )=1+½log I( a   i )
 
         [0038]    When ε i  is known, the overall complexity becomes 
         [0000]    
       
         
           
             C 
             = 
             
               
                 - 
                 L 
               
               + 
               
                 
                   ∑ 
                   
                     
                       a 
                       i 
                     
                     ≠ 
                     0 
                   
                 
                  
                 
                   log 
                    
                   
                      
                     
                       a 
                       i 
                     
                      
                   
                 
               
               + 
               
                 log 
                  
                 
                     
                 
                  
                 
                   n 
                   a 
                 
               
               + 
               1 
               + 
               
                 δ 
                  
                 
                     
                 
                  
                 
                   C 
                   
                     a 
                     i 
                   
                 
               
             
           
         
       
     
         [0039]    Denote 
         [0000]    
       
         
           
             
               α 
               i 
             
             = 
             
               
                 n 
                 a 
               
               * 
               
                 2 
                 
                   1 
                   + 
                   
                     δ 
                      
                     
                         
                     
                      
                     
                       C 
                       
                         a 
                         i 
                       
                     
                   
                 
               
             
           
         
       
     
         [0040]    and, 
         [0000]      A i =a i a i    
         [0041]    Hence, 
         [0000]    
       
         
           
             C 
             = 
             
               
                 - 
                 L 
               
               + 
               
                 
                   ∑ 
                   
                     
                       A 
                       i 
                     
                     ≠ 
                     0 
                   
                 
                  
                 
                   log 
                    
                   
                     ( 
                     
                        
                       
                         A 
                         i 
                       
                        
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0042]    When A i  is small, it is not a good measurement of the coefficient complexity. For example, when A i &lt;1, the complexity is negative. Hence, we replace log(.) with a smooth function (with continuous value and first derivative) DO: 
         [0000]    
       
         
           
             
               D 
                
               
                 ( 
                 x 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     
                       log 
                        
                       
                           
                       
                        
                       x 
                     
                   
                   
                     
                       
                         
                           if 
                            
                           
                               
                           
                            
                           x 
                         
                         ≥ 
                         e 
                       
                       ; 
                     
                   
                 
                 
                   
                     
                       x 
                        
                       
                         
                           log 
                            
                           
                               
                           
                            
                           e 
                         
                         e 
                       
                     
                   
                   
                     
                       
                         if 
                          
                         
                             
                         
                          
                         x 
                       
                       &lt; 
                       
                         e 
                         . 
                       
                     
                   
                 
               
             
           
         
       
     
         [0043]    Thus a can be found by minimize 
         [0000]    
       
         
           
             C 
             = 
             
               
                 - 
                 L 
               
               + 
               
                 
                   ∑ 
                   
                     
                       A 
                       i 
                     
                     ≠ 
                     0 
                   
                 
                  
                 
                   D 
                    
                   
                     ( 
                     
                        
                       
                         A 
                         i 
                       
                        
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0044]    In general, one efficient to find both a and e is: 
         [0045]    1, find a without coefficient complexity 
         [0046]    2, find e 
         [0047]    3, find new a based on e 
         [0048]    4, iterate until converge or meet some exit criteria