Class InvertMatrix


  • public class InvertMatrix
    extends Object
    • Constructor Detail

      • InvertMatrix

        public InvertMatrix()
    • Method Detail

      • invert

        public static INDArray invert​(INDArray arr,
                                      boolean inPlace)
        Inverts a matrix
        Parameters:
        arr - the array to invert
        inPlace - Whether to store the result in arr
        Returns:
        the inverted matrix
      • pinvert

        public static INDArray pinvert​(INDArray arr,
                                       boolean inPlace)
        Calculates pseudo inverse of a matrix using QR decomposition
        Parameters:
        arr - the array to invert
        Returns:
        the pseudo inverted matrix
      • pLeftInvert

        public static INDArray pLeftInvert​(INDArray arr,
                                           boolean inPlace)
        Compute the left pseudo inverse. Input matrix must have full column rank. See also: Moore–Penrose inverse
        Parameters:
        arr - Input matrix
        inPlace - Whether to store the result in arr
        Returns:
        Left pseudo inverse of arr
        Throws:
        IllegalArgumentException - Input matrix arr did not have full column rank.
      • pRightInvert

        public static INDArray pRightInvert​(INDArray arr,
                                            boolean inPlace)
        Compute the right pseudo inverse. Input matrix must have full row rank. See also: Moore–Penrose inverse
        Parameters:
        arr - Input matrix
        inPlace - Whether to store the result in arr
        Returns:
        Right pseudo inverse of arr
        Throws:
        IllegalArgumentException - Input matrix arr did not have full row rank.