| bdpseudoinv_hdf5 | R Documentation |
Computes the Moore-Penrose pseudoinverse of a matrix stored in HDF5 format. The implementation is designed for large matrices, using block-based processing and efficient I/O operations.
bdpseudoinv_hdf5(
filename,
group,
dataset,
outgroup = NULL,
outdataset = NULL,
overwrite = NULL,
threads = NULL
)
filename |
String. Path to the HDF5 file. |
group |
String. Group containing the input matrix. |
dataset |
String. Dataset name for the input matrix. |
outgroup |
Optional string. Output group name (defaults to "PseudoInverse"). |
outdataset |
Optional string. Output dataset name (defaults to input dataset name). |
overwrite |
Logical. Whether to overwrite existing results. |
threads |
Optional integer. Number of threads for parallel computation. |
This function provides an HDF5-based implementation for computing pseudoinverses of large matrices. Key features:
HDF5 Integration:
Efficient reading of input matrix
Block-based processing for large matrices
Memory-efficient computation
Direct output to HDF5 format
Implementation Features:
SVD-based computation
Parallel processing support
Automatic memory management
Flexible output options
The function handles:
Data validation
Memory management
Error handling
HDF5 file operations
List with components. If an error occurs, all string values are returned as empty strings (""):
Character string with the HDF5 filename
Character string with the full dataset path to the pseudoinverse matrix (group/dataset)
Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations, 4th Edition. Johns Hopkins University Press.
The HDF Group. (2000-2010). HDF5 User's Guide.
bdpseudoinv for in-memory computation
bdCreate_hdf5_matrix for creating HDF5 matrices
fn <- tempfile(fileext = ".h5")
X <- matrix(c(1,2,3,2,4,6), 2, 3)
hdf5_create_matrix(fn, "data/X", data = X)
bdpseudoinv_hdf5(filename = fn,
group = "data",
dataset = "X",
outgroup = "results",
outdataset = "X_pinv",
overwrite = TRUE)
hdf5_close_all()
unlink(fn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.