| Trees | Indices | Help | 
 | 
|---|
|  | 
Module containing functions for calculating the chi-squared value, gradient, and Hessian.
| 
 | |||
| float | 
 | ||
| float | 
 | ||
| 
 | |||
| float | 
 | ||
| 
 | |||
| float | 
 | ||
| 
 | |||
| __package__ =  | |||
Imports: dot, sum, transpose
| 
 | |||
| 
 Function to calculate the chi-squared value. The chi-squared equationThe equation is: 
                   _n_
                   \    (yi - yi(theta)) ** 2
   chi^2(theta)  =  >   ---------------------
                   /__      sigma_i ** 2
                   i=1
where 
 
 | 
| 
 Function to calculate the chi-squared value for multiple numpy array axis. The chi-squared equationThe equation is: 
                   _n_
                   \    (yi - yi(theta)) ** 2
   chi^2(theta)  =  >   ---------------------
                   /__      sigma_i ** 2
                   i=1
where 
 
 | 
| 
 Calculate the full chi-squared gradient. The chi-squared gradientThe equation is: 
                        _n_
   dchi^2(theta)        \   / yi - yi(theta)     dyi(theta) \ 
   -------------  =  -2  >  | --------------  .  ---------- |
      dthetaj           /__ \   sigma_i**2        dthetaj   /
                        i=1
where 
 
 | 
| 
 Calculate the chi-squared gradient element j. The chi-squared gradientThe equation is: 
                        _n_
   dchi^2(theta)        \   / yi - yi(theta)     dyi(theta) \ 
   -------------  =  -2  >  | --------------  .  ---------- |
      dthetaj           /__ \   sigma_i**2        dthetaj   /
                        i=1
where 
 
 | 
| 
 Calculate the full chi-squared Hessian. The chi-squared HessianThe equation is: 
                         _n_
   d2chi^2(theta)        \       1      / dyi(theta)   dyi(theta)                        d2yi(theta)   \ 
   ---------------  =  2  >  ---------- | ---------- . ----------  -  (yi-yi(theta)) . --------------- |
   dthetaj.dthetak       /__ sigma_i**2 \  dthetaj      dthetak                        dthetaj.dthetak /
                         i=1
where 
 
 | 
| 
 Calculate the chi-squared Hessian element {j, k}. The chi-squared HessianThe equation is: 
                         _n_
   d2chi^2(theta)        \       1      / dyi(theta)   dyi(theta)                        d2yi(theta)   \ 
   ---------------  =  2  >  ---------- | ---------- . ----------  -  (yi-yi(theta)) . --------------- |
   dthetaj.dthetak       /__ sigma_i**2 \  dthetaj      dthetak                        dthetaj.dthetak /
                         i=1
where 
 
 | 
| Trees | Indices | Help | 
 | 
|---|
| Generated by Epydoc 3.0.1 on Wed Sep 30 14:40:41 2015 | http://epydoc.sourceforge.net |