pub struct CountedTargets<L: Label, P> { /* private fields */ }
Expand description

Targets with precomputed, counted labels

This extends plain targets with pre-counted labels. The label map is useful when, for example, a prior probability is estimated (e.g. in Naive Bayesian implementation) or the samples are weighted inverse to their occurence.

Fields

  • targets: wrapped target field
  • labels: counted labels with label-count association

Implementations

Trait Implementations

Returns a view on targets as two-dimensional array

Convert to single target, fails for more than one target Read more

Returns a mutable view on targets as two-dimensional array

Convert to single target, fails for more than one target

Create self object from new target array

Counted labels can act as labels

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.