The Learning of Linear Dynamical State Space Models According to the Principles of Free Energy