[Scipy-tickets] [SciPy] #1288: stats streamlining obrientransform

SciPy Trac scipy-tickets@scipy....
Sun Sep 26 07:46:55 CDT 2010


#1288: stats streamlining obrientransform
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 loop over nobs can be removed, vectorized

 {{{
 >>> a = np.array([1, 1, 5, 0, 1, 2, 2, 0, 1, 4])
 >>> nobsa = float(len(a))
 >>> acent2 = (a-np.mean(a))**2;
 >>> (nobsa*(nobsa-1.5)*acent2 - 0.5*acent2.sum(0)) /(nobsa-2.)/(nobsa-1.)
 array([  0.41111111,   0.41111111,  12.68888889,   3.24444444,
          0.41111111,  -0.06111111,  -0.06111111,   3.24444444,
          0.41111111,   6.07777778])
 >>> stats.obrientransform(a)
 array([[  0.41111111,   0.41111111,  12.68888889,   3.24444444,
           0.41111111,  -0.06111111,  -0.06111111,   3.24444444,
           0.41111111,   6.07777778]])
 }}}

 Reference http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.80.9991

 (I didn't read the entire paper)

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1288>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list