Struct mlscraper_rust::search::Training
source · pub struct Training<'a> { /* private fields */ }
Expand description
Represents a training process. Contains the documents and attributes that are used for training.
Implementations§
source§impl<'a> Training<'a>
impl<'a> Training<'a>
pub fn documents_mut<'l>(&'l mut self) -> &'l mut Vec<VDom<'a>>
sourcepub fn attributes<'l>(&'l self) -> &'l Vec<Attribute<'a>>
pub fn attributes<'l>(&'l self) -> &'l Vec<Attribute<'a>>
The attributes that are used for training.
pub fn new( documents: Vec<VDom<'a>>, attributes: Vec<Attribute<'a>> ) -> Result<Self>
pub fn with_settings( documents: Vec<VDom<'a>>, attributes: Vec<Attribute<'a>>, settings: FuzzerSettings ) -> Result<Self>
sourcepub fn do_one_fuzzing_round<R: Rng>(&mut self, rng: &mut R)
pub fn do_one_fuzzing_round<R: Rng>(&mut self, rng: &mut R)
Perform one round of generation, mutation, and sorting for every attribute.
sourcepub fn get_best_selector_for(
&self,
attribute: &Attribute<'_>
) -> Option<Selector>
pub fn get_best_selector_for( &self, attribute: &Attribute<'_> ) -> Option<Selector>
Returns the best selector for the given attribute, if any.
sourcepub fn to_result(self) -> TrainingResult
pub fn to_result(self) -> TrainingResult
Turns this training into a TrainingResult
, consuming the training.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Training<'a>
impl<'a> !Send for Training<'a>
impl<'a> !Sync for Training<'a>
impl<'a> Unpin for Training<'a>
impl<'a> !UnwindSafe for Training<'a>
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