pub struct MarkovPolicy {
pub additive_smoothing: f64,
pub held_out_sequences: usize,
pub corpus: CorpusProvenance,
}Expand description
Explicit fitting and evaluation policy for a finite first-order model.
Fields§
§additive_smoothing: f64Additive pseudo-count applied to every transition in the finite state set.
held_out_sequences: usizeNumber of trailing sequences reserved for held-out evaluation.
corpus: CorpusProvenanceIdentity, origin, license, and exact content hash of the corpus.
Implementations§
Source§impl MarkovPolicy
impl MarkovPolicy
Sourcepub fn new(
additive_smoothing: f64,
held_out_sequences: usize,
corpus: CorpusProvenance,
) -> Result<Self, MarkovError>
pub fn new( additive_smoothing: f64, held_out_sequences: usize, corpus: CorpusProvenance, ) -> Result<Self, MarkovError>
Builds a policy and rejects absent smoothing or incomplete provenance.
Trait Implementations§
Source§impl Clone for MarkovPolicy
impl Clone for MarkovPolicy
Source§fn clone(&self) -> MarkovPolicy
fn clone(&self) -> MarkovPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkovPolicy
impl Debug for MarkovPolicy
Source§impl PartialEq for MarkovPolicy
impl PartialEq for MarkovPolicy
impl StructuralPartialEq for MarkovPolicy
Auto Trait Implementations§
impl Freeze for MarkovPolicy
impl RefUnwindSafe for MarkovPolicy
impl Send for MarkovPolicy
impl Sync for MarkovPolicy
impl Unpin for MarkovPolicy
impl UnsafeUnpin for MarkovPolicy
impl UnwindSafe for MarkovPolicy
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