MCPcopy Create free account
hub / github.com/Open-Quant/openquant / from_params

Method from_params

crates/openquant/tests/hyperparameter_tuning.rs:34–39  ·  view source on GitHub ↗
(params: &ParamSet)

Source from the content-addressed store, hash-verified

32
33impl 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
42impl SimpleClassifier for ThresholdClassifier {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected