GithubHelp home page GithubHelp logo

Comments (2)

obilaniu avatar obilaniu commented on August 28, 2024

What would be incorrect with it?

Just for fun I tried creating a PSD matrix $V$ and then verifying that $VV^{-\frac{1}{2}}V^{-\frac{1}{2}} = I$, and it jolly well does:

>>> import numpy as np
>>> x = np.random.normal(size=(2,2))
>>> V = x.dot(x.T)
>>> V
array([[ 0.48580582, -1.27191924],
       [-1.27191924,  3.64642338]])
>>> Vrr, Vri, Vii = float(V[0,0]), float(V[0,1]), float(V[1,1])
>>> tau = Vrr + Vii
>>> delta = (Vrr * Vii) - (Vri ** 2)
>>> s = np.sqrt(delta)
>>> t = np.sqrt(tau + 2 * s)
>>> inverse_st = 1.0 / (s * t)
>>> Wrr = (Vii + s) * inverse_st
>>> Wii = (Vrr + s) * inverse_st
>>> Wri = -Vri * inverse_st
>>> W = np.array([[Wrr, Wri], [Wri, Wii]])
>>> W
array([[ 4.64616077,  1.46332366],
       [ 1.46332366,  1.00991855]])
>>> V.dot(W.dot(W))
array([[  1.00000000e+00,   3.02928156e-16],
       [ -4.25075250e-16,   1.00000000e+00]])

from deep_complex_networks.

gudovskiy avatar gudovskiy commented on August 28, 2024

@obilaniu Your solution is right. It is funny, but indeed 1/(st) = t / ( (Vrr + s)(Vii + s) - (Vri**2) ).

from deep_complex_networks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.