pub enum Loss {
Misclassification,
Custom {
function: Box<dyn LeafLoss>,
input: LossInput,
},
}Expand description
The loss a search minimises.
Variants§
Misclassification
Misclassification: the number of instances not of the majority class.
Custom
A caller’s loss, with the input it asks for.
Implementations§
Source§impl Loss
impl Loss
Sourcepub fn is_misclassification(&self) -> bool
pub fn is_misclassification(&self) -> bool
Whether this is the built-in misclassification.
Sourcepub fn uses_indices(&self) -> bool
pub fn uses_indices(&self) -> bool
Whether the loss reads instance ids rather than class counts.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Loss
impl !UnwindSafe for Loss
impl Freeze for Loss
impl Send for Loss
impl Sync for Loss
impl Unpin for Loss
impl UnsafeUnpin for Loss
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