(params: &ParamSet)
| 32 | |
| 33 | impl ThresholdClassifier { |
| 34 | fn from_params(params: &ParamSet) -> Self { |
| 35 | let threshold = params.get("threshold").and_then(HyperParamValue::as_f64).unwrap_or(0.5); |
| 36 | let sharpness = params.get("sharpness").and_then(HyperParamValue::as_f64).unwrap_or(6.0); |
| 37 | |
| 38 | Self { threshold, sharpness, trained_prior: 0.5 } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | impl SimpleClassifier for ThresholdClassifier { |
nothing calls this directly
no outgoing calls
no test coverage detected