Package org.tribuo.math.util
Interface Merger
- All Superinterfaces:
ProtoSerializable<org.tribuo.math.protos.MergerProto>
,Serializable
- All Known Implementing Classes:
HeapMerger
,MatrixHeapMerger
An interface for merging an array of
DenseSparseMatrix
into a single DenseSparseMatrix
.
Mergers are principally used to aggregate gradients across a minibatch.
Merging is done by summation.
-
Field Summary
Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER
-
Method Summary
Modifier and TypeMethodDescriptionmerge
(DenseSparseMatrix[] inputs) Merges an array of DenseSparseMatrix into a single DenseSparseMatrix.merge
(SparseVector[] inputs) Merges an array of SparseVector into a single SparseVector.Methods inherited from interface org.tribuo.protos.ProtoSerializable
serialize
-
Method Details
-
merge
Merges an array of DenseSparseMatrix into a single DenseSparseMatrix.- Parameters:
inputs
- The matrices to merge.- Returns:
- The merged matrix.
-
merge
Merges an array of SparseVector into a single SparseVector.- Parameters:
inputs
- The vectors to merge.- Returns:
- The merged vector.
-