pub struct ClassifierGain<T: Classifier> {
    pub classifier: T,
}

Fields

classifier: T

Trait Implementations

Return an approximation of the classifier-likelihood based gain when splitting segment [start, stop) for each split in split_candidates.

A single fit is generated with a split at guess.

Total number of observations.

Return classifier-likelihood based gain when splitting segment [start, stop) at split.

Perform a permutation test.

We test whether the maximum observed gain from the first step in the TwoStepSearch optimizer is significant. Using the maximum gain from the first step instead allows us to do a proper permutation test with control of type I error without fitting additional classifiers.

In the first step of the TwoStepSearch optimizer, three gain curves and corresponding maximal gains are computed. The maximum gain of the first step of TwoStepSearch is the maximum of these three gains, which are available as the first three elements of optimizer_result.gain_results.

For each permutation, we shuffle the predictions (and thus the likelihoods) of each of the three initial classifier fits (using the same permutation), and compute the maximum of the three resulting maximal gains. We count the number of permutations where the resulting maximal gain was larger than the observed maximal gain to compute a p-value.

Hyperparameters.

Loss of segment [start, stop). Read more

Gain when splitting segment [start, stop) at points in split_candidates. Read more

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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.