pub fn reconstruct<T: FloatExt, S: Data<Elem = T>>(
projected: ArrayBase<S, Ix2>,
d: usize,
projection: impl Fn(usize, usize) -> T,
normalizer: T,
) -> Result<Array<T, Ix2>, RandomProjectionCodecError>
Expand description
Applies the (approximate) inverse of random projection to the projected
array to reconstruct the input data with dimensionality d
and returns the
resulting 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::NonFiniteData
if theprojected
array or the reconstructed output contains non-finite data