https://kivy.pythonprogramminghelp.com/how-to-build-reproduced-and-residual-correlation-matrices/