pub enum RandomProjectionCodecError {
UnsupportedDtype(AnyArrayDType),
NonMatrixData {
source: ShapeError,
},
NonFiniteData,
NumberOfSamplesMismatch {
input: usize,
output: usize,
},
ProjectedArrayZeroComponents,
CorruptedNumberOfComponents,
NumberOfFeaturesMismatch {
metadata: usize,
output: usize,
},
MismatchedDecodeIntoArray {
source: AnyArrayAssignError,
},
}Expand description
Errors that may occur when applying the RandomProjectionCodec.
Variants§
UnsupportedDtype(AnyArrayDType)
RandomProjectionCodec does not support the dtype
NonMatrixData
RandomProjectionCodec only supports matrix / 2d-shaped arrays
Fields
source: ShapeErrorThe source of the error
NonFiniteData
RandomProjectionCodec does not support non-finite (infinite or NaN)
floating point data
NumberOfSamplesMismatch
RandomProjectionCodec cannot encode or decode from an array with
$N$ samples to an array with a different number of samples
Fields
ProjectedArrayZeroComponents
RandomProjectionCodec cannot decode from an array with zero
dimensionality $K$
CorruptedNumberOfComponents
RandomProjectionCodec cannot decode from an array with corrupted
dimensionality metadata
NumberOfFeaturesMismatch
RandomProjectionCodec cannot decode into an array with $D$
features that differs from the $D$ stored in the encoded metadata
Fields
MismatchedDecodeIntoArray
RandomProjectionCodec cannot decode into the provided array
Fields
source: AnyArrayAssignErrorThe source of the error