public override IPredictorProducing <Float> Train(TrainContext context)
        {
            TrainBase(context);
            var predictor = new BinaryClassGamPredictor(Host, InputLength, TrainSet,
                                                        MeanEffect, BinEffects, FeatureMap);
            var calibrator = new PlattCalibrator(Host, -1.0 * _sigmoidParameter, 0);

            return(new CalibratedPredictor(Host, predictor, calibrator));
        }
        public static IPredictorProducing <Float> Create(IHostEnvironment env, ModelLoadContext ctx)
        {
            Contracts.CheckValue(env, nameof(env));
            env.CheckValue(ctx, nameof(ctx));
            ctx.CheckAtModel(GetVersionInfo());

            var         predictor = new BinaryClassGamPredictor(env, ctx);
            ICalibrator calibrator;

            ctx.LoadModelOrNull <ICalibrator, SignatureLoadModel>(env, out calibrator, @"Calibrator");
            if (calibrator == null)
            {
                return(predictor);
            }
            return(new SchemaBindableCalibratedPredictor(env, predictor, calibrator));
        }