| det | R Documentation |
These functions mimic the 'base' functions det and determinant to operate on gpu.matrix-class objects: "det calculates the determinant of a matrix. determinant is a generic function that returns separately the modulus of the determinant, optionally on the logarithm scale, and the sign of the determinant."
## S4 method for signature 'gpu.matrix.tensorflow,logical'
determinant(x,logarithm,...)
## S4 method for signature 'gpu.matrix.tensorflow,missing'
determinant(x,logarithm,...)
## S4 method for signature 'gpu.matrix.torch,logical'
determinant(x,logarithm,...)
## S4 method for signature 'gpu.matrix.torch,missing'
determinant(x,logarithm,...)
## S4 method for signature 'gpu.matrix.tensorflow'
det(x,...)
## S4 method for signature 'gpu.matrix.torch'
det(x,...)
x |
a |
... |
Optional parameters. For more details seee |
logarithm |
logical; if TRUE (default) return the logarithm of the modulus of the determinant. |
The function det and determinant internally call the corresponding function of the library torch or tensorflow (depending on the type of input gpu.matrix-class).
If the input gpu.matrix-class object(s) are stored on the GPU, then the operations will be performed on the GPU. See gpu.matrix.
det returns the same output corresponding to the base function det, which is the determinant of x. The returned value is a object of class numeric sotred in the cpu.
determinant returns the corresponding output of the base function determinant, which is an object of class det, that contains the following components:
modulus |
a numeric value. The modulus (absolute value) of the determinant if logarithm is FALSE; otherwise the logarithm of the modulus. |
sign |
integer; either +1 or -1 according to whether the determinant is positive or negative. |
For more information see:
det.
## Not run:
x <- gpu.matrix(1:4,nrow=2, ncol = 2)
determinant(x) #modulus of the determinant.
det(x)#the determinant.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.