(random_state: u64)
| 118 | /// A `sample_weight` was passed while `supports_sample_weight` is `false`. |
| 119 | #[error("the base estimator does not support sample weights")] |
| 120 | SampleWeightNotSupported, |
| 121 | /// A sample weight is negative or non-finite, or all weights are zero. |
| 122 | #[error("sample weights must be finite, non-negative and not all zero")] |
| 123 | InvalidSampleWeight, |
| 124 | } |
| 125 | |
| 126 | /// Number of label draws per estimator. |
| 127 | #[derive(Debug, Clone, Copy)] |
| 128 | pub enum MaxSamples { |
| 129 | /// An absolute count; must be in `1..=x.nrows()`. |
| 130 | Int(usize), |
| 131 | /// A fraction of `x.nrows()`, rounded down; must be positive and resolve to a count in |
| 132 | /// `1..=x.nrows()` (so at most `1.0`). |
| 133 | Float(f64), |
| 134 | } |
| 135 | |
| 136 | /// Number of feature indices drawn per estimator. Only the first drawn index is used by the |
| 137 | /// base learner, so values above one change only the random stream. |
| 138 | #[derive(Debug, Clone, Copy)] |
nothing calls this directly
no outgoing calls
no test coverage detected