pub fn project_into<T: FloatExt, S: Data<Elem = T>>(
data: ArrayBase<S, Ix2>,
projected: ArrayViewMut<'_, T, Ix2>,
projection: impl Fn(usize, usize) -> T,
normalizer: T,
) -> Result<(), RandomProjectionCodecError>
Expand description
Applies random projection to the input data
and outputs into the
projected
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 inputdata
’s number of samples doesn’t match theprojected
array’s number of samplesRandomProjectionCodecError::NonFiniteData
if the inputdata
or projected output contains non-finite data