Example #1
0
        public static ModelEvaluatorDiscreteConditional GetInstance(string leafDistributionName, ModelScorer modelScorer, bool includePredictorInScore)
        {
            DistributionDiscreteSingleVariable nullDistn = DistributionDiscreteSingleVariable.GetInstance();
            DistributionDiscreteConditional    condDistn = DistributionDiscreteConditional.GetInstance(leafDistributionName);

            return(new ModelEvaluatorDiscreteConditional(nullDistn, condDistn, modelScorer, includePredictorInScore));
        }
Example #2
0
 protected ModelEvaluatorDiscreteConditional(
     DistributionDiscreteSingleVariable nullDistn,
     DistributionDiscreteConditional conditionalDistn,
     ModelScorer scorer,
     bool includePredictorInScore)
     : base(SpecialFunctions.CreateSingletonList <IDistributionSingleVariable>(nullDistn), conditionalDistn, scorer)
 {
     _includePredictorInScore = includePredictorInScore;
 }
 public static DistributionDiscrete GetInstance(string distributionAndLeafName)
 {
     if (distributionAndLeafName.StartsWith("Conditional"))
     {
         return(DistributionDiscreteConditional.GetInstance(distributionAndLeafName.Substring("Conditional".Length)));
     }
     else if (distributionAndLeafName.StartsWith("Joint"))
     {
         return(DistributionDiscreteJointUndirected.GetInstance(distributionAndLeafName.Substring("Joint".Length)));
     }
     throw new ArgumentException("Cannot parse DistributionDiscrete name " + distributionAndLeafName);
 }