pub fn reconstruct_into<T: FloatExt, S: Data<Elem = T>>(
projected: ArrayBase<S, Ix2>,
reconstructed: ArrayViewMut<'_, T, Ix2>,
projection: impl Fn(usize, usize) -> T,
normalizer: T,
) -> Result<(), RandomProjectionCodecError>
Expand description
Applies the (approximate) inverse of random projection to the projected
array to reconstruct the input data outputs into the reconstructed
array.
The random projection matrix is defined by the projection
function
(i, j) -> P[i, j]
and a globally applied normalizer
factor.
§Errors
Errors with
RandomProjectionCodecError::NumberOfSamplesMismatch
if the number of samplesN
of theprojected
array don’t match the number of samples of thereconstructed
arrayRandomProjectionCodecError::NonFiniteData
if theprojected
array or the reconstructed output contains non-finite data