pub struct LabelObservation {
pub types: BTreeSet<GffType>,
pub files: usize,
pub files_with_value: usize,
}Expand description
What a corpus was seen to carry under one label.
Fields§
§types: BTreeSet<GffType>Types the label was seen holding. A label may hold different types in different files, so this is a set rather than one value.
files: usizeHow many files carried the label.
This is what turns a label list into a priority order. A label in every file and a label in one are very different propositions, and without the count they read identically.
files_with_value: usizeHow many files carried the label holding something other than its zero value.
Prevalence alone misranks: a label present in every file and empty in all of them carries no information, while a label in a handful of files holding real values does. Ranking needs both.
§This orders work; it does not decide what to model
Neither this count nor the file count predicts whether a field is worth
modelling, and both have been wrong in both directions. Only what the
loader does with a field settles it; these counts are for deciding what
to look at first. docs/src/architecture.md works through the three
ways the counts mislead, with a real field behind each.
Trait Implementations§
Source§impl Clone for LabelObservation
impl Clone for LabelObservation
Source§fn clone(&self) -> LabelObservation
fn clone(&self) -> LabelObservation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LabelObservation
impl Debug for LabelObservation
Source§impl Default for LabelObservation
impl Default for LabelObservation
Source§fn default() -> LabelObservation
fn default() -> LabelObservation
Source§impl PartialEq for LabelObservation
impl PartialEq for LabelObservation
Source§fn eq(&self, other: &LabelObservation) -> bool
fn eq(&self, other: &LabelObservation) -> bool
self and other values to be equal, and is used by ==.