Example #1
0
 public NaiveBayesModel(Context[] parameters, string[] predLabels, string[] outcomeNames)
     : base(parameters, predLabels, outcomeNames)
 {
     outcomeTotals  = InitOutcomeTotals(outcomeNames, parameters);
     evalParameters = new NaiveBayesEvalParameters(parameters, outcomeNames.Length, outcomeTotals,
                                                   predLabels.Length);
     ModelType = ModelType.NaiveBayes;
 }
Example #2
0
 public NaiveBayesModel(Context[] parameters, string[] predLabels, string[] outcomeNames, int correctionConstant,
                        double correctionParam)
     : base(parameters, predLabels, outcomeNames, correctionConstant, correctionParam)
 {
     outcomeTotals  = InitOutcomeTotals(outcomeNames, parameters);
     evalParameters = new NaiveBayesEvalParameters(parameters, outcomeNames.Length, outcomeTotals,
                                                   predLabels.Length);
     ModelType = ModelType.NaiveBayes;
 }