protected override PoissonRegressionPredictor CreatePredictor() { VBuffer <float> weights = default(VBuffer <float>); CurrentWeights.CopyTo(ref weights, 1, CurrentWeights.Length - 1); float bias = 0; CurrentWeights.GetItemOrDefault(0, ref bias); return(new PoissonRegressionPredictor(Host, ref weights, bias)); }
public override ParameterMixingCalibratedPredictor CreatePredictor() { // Logistic regression is naturally calibrated to // output probabilities when transformed using // the logistic function, so there is no need to // train a separate calibrator. VBuffer <Float> weights = default(VBuffer <Float>); Float bias = 0; CurrentWeights.GetItemOrDefault(0, ref bias); CurrentWeights.CopyTo(ref weights, 1, CurrentWeights.Length - 1); return(new ParameterMixingCalibratedPredictor(Host, new LinearBinaryPredictor(Host, ref weights, bias, _stats), new PlattCalibrator(Host, -1, 0))); }