SVDWorker {distcomp} | R Documentation |
R6 class for a SVD worker object to use with master objects generated by SVDMaster()
Description
SVDWorker
objects are worker objects at each site of a distributed SVD model computation
Methods
Public methods
Method new()
Create a new SVDWorker
object.
Usage
SVDWorker$new(defn, data, stateful = TRUE)
Arguments
defn
the computation definition
data
the local
x
matrixstateful
a boolean flag indicating if state needs to be preserved between REST calls,
TRUE
by default
Returns
a new SVDWorker
object
Method reset()
Reset the computation state by initializing work matrix and set up starting values for iterating
Usage
SVDWorker$reset()
Method dimX()
Return the dimensions of the matrix
Usage
SVDWorker$dimX(...)
Arguments
...
other args ignored
Returns
the dimension of the matrix
Method updateV()
Return an updated value for the V
vector, normalized by arg
Usage
SVDWorker$updateV(arg, ...)
Arguments
arg
the normalizing value
...
other args ignored
Returns
updated V
Method updateU()
Update U
and return the updated norm of U
Usage
SVDWorker$updateU(arg, ...)
Arguments
arg
the initial value
...
other args ignored
Returns
updated norm of U
Method normU()
Normalize U
vector
Usage
SVDWorker$normU(arg, ...)
Arguments
arg
the normalizing value
...
other args ignored
Returns
TRUE
invisibly
Method fixU()
Construct residual matrix using arg
Usage
SVDWorker$fixU(arg, ...)
Arguments
arg
the value to use for residualizing
...
other args ignored
Method getN()
Getthe number of rows of x
matrix
Usage
SVDWorker$getN()
Returns
the number of rows of x
matrix
Method getP()
Getthe number of columnsof x
matrix
Usage
SVDWorker$getP()
Returns
the number of columns of x
matrix
Method getStateful()
Return the stateful status of the object.
Usage
SVDWorker$getStateful()
Returns
the stateful flag, TRUE
or FALSE
Method kosher()
Check if inputs and state of object are sane. For future use
Usage
SVDWorker$kosher()
Returns
TRUE
or FALSE
Method clone()
The objects of this class are cloneable with this method.
Usage
SVDWorker$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
SVDMaster()
which goes hand-in-hand with this object