pub struct ExclusionRecord { /* private fields */ }Expand description
The deterministic record of everything cross-split duplication removed.
Implementations§
Source§impl ExclusionRecord
impl ExclusionRecord
Sourcepub fn excluded_train_ids(&self) -> &[String]
pub fn excluded_train_ids(&self) -> &[String]
Training ids removed from the selection pool, sorted ascending.
Sourcepub fn reduced_pools(&self) -> &BTreeMap<usize, u64>
pub fn reduced_pools(&self) -> &BTreeMap<usize, u64>
Remaining training pool size per class label, after exclusion.
Sourcepub fn groups(&self) -> &[DuplicateGroup]
pub fn groups(&self) -> &[DuplicateGroup]
The duplicate components, sorted deterministically.
Sourcepub fn to_canonical_bytes(&self) -> Result<Vec<u8>, ContrastiveDataError>
pub fn to_canonical_bytes(&self) -> Result<Vec<u8>, ContrastiveDataError>
Deterministic canonical serialization.
§Errors
ContrastiveDataError::Serialization if the record cannot be serialized.
Sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
SHA-256 of Self::to_canonical_bytes.
Total for the same reason the ledger’s hash is: the canonical form is strings,
integers and booleans, with every map a BTreeMap<usize, u64> whose keys
serialize as strings. serde_json has no failure mode to report here.
Trait Implementations§
Source§impl Clone for ExclusionRecord
impl Clone for ExclusionRecord
Source§impl Debug for ExclusionRecord
impl Debug for ExclusionRecord
Source§impl<'de> Deserialize<'de> for ExclusionRecord
impl<'de> Deserialize<'de> for ExclusionRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExclusionRecord
Source§impl PartialEq for ExclusionRecord
impl PartialEq for ExclusionRecord
Source§impl Serialize for ExclusionRecord
impl Serialize for ExclusionRecord
impl StructuralPartialEq for ExclusionRecord
Auto Trait Implementations§
impl Freeze for ExclusionRecord
impl RefUnwindSafe for ExclusionRecord
impl Send for ExclusionRecord
impl Sync for ExclusionRecord
impl Unpin for ExclusionRecord
impl UnsafeUnpin for ExclusionRecord
impl UnwindSafe for ExclusionRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more