sparsify
- pyoptex.analysis.estimators.sams.bnb.sams_bnb.sparsify(models, nterms)[source]
Makes a certain collection of models sparse using a boolean mask for the model terms.
Parameters
- modelsnp.ndarray(2d)
The set of models, each row is one model.
- ntermsint
The total number of possible terms (to define the sparse matrix dimensions).
Returns
- sparse_matrixscipy.sparse.csc_matrix
The sparse csc matrix.