private protected override IPredictorProducing <float> TrainModelCore(TrainContext context)
        {
            TrainBase(context);
            var predictor = new BinaryClassificationGamModelParameters(Host, InputLength, TrainSet,
                                                                       MeanEffect, BinEffects, FeatureMap);
            var calibrator = new PlattCalibrator(Host, -1.0 * _sigmoidParameter, 0);

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

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

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