daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. c= Sum(u(i)*<u(i),y>/v(i) )
  2.    
  3. k=np.array([[1,2,3],[2,3,4],[2,7,8]])
  4. y=np.array([1,4,5])
  5. w,u=np.linalg.eigh(k)
  6.    
  7. w=array([ -2.02599523,   0.47346124,  13.552534  ])
  8.  
  9.  
  10. u=array([[-0.18897996,  0.95770742,  0.21698634],
  11.         [ 0.82245177,  0.03363605,  0.5678395 ],
  12.        [-0.53652554, -0.28577109,  0.79402471]])
  13.    
  14. uDoty=np.dot(u,y)
  15. div=np.divide(y,w)
  16.  
  17. div=np.divide(uDoty,w)
  18. r=np.tile(div,(len(u),1))
  19. a=u*r.T
  20. c=sum(a)
  21.    
  22. U = np.dot(u, y)
  23. d = U/w
  24. a = u*d[:,None]
  25. c = a.sum()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top