public MultiSplitDecisionTreeModelBuilder( ISplitQualityChecker splitQualityChecker, IBestSplitSelector bestSplitSelector, ILeafBuilder leafBuilder, IStatisticalSignificanceChecker statisticalSignificanceChecker = null) : base(splitQualityChecker, bestSplitSelector, leafBuilder, statisticalSignificanceChecker) { }
protected BaseDecisionTreeModelBuilder( ISplitQualityChecker splitQualityChecker, IBestSplitSelector bestSplitSelector, ILeafBuilder leafBuilder, IStatisticalSignificanceChecker statisticalSignificanceChecker = null) { SplitQualityChecker = splitQualityChecker; BestSplitSelector = bestSplitSelector; LeafBuilder = leafBuilder; this.StatisticalSignificanceChecker = statisticalSignificanceChecker; }
private IDecisionTreeModelBuilder BuildCustomModelBuilder( bool binary = false, ISplitQualityChecker splitQualityChecker = null, IBestSplitSelector bestSplitSelector = null, ILeafBuilder leafBuilder = null, IStatisticalSignificanceChecker statisticalSignificanceChecker = null) { if (binary) { return(new BinaryDecisionTreeModelBuilder( splitQualityChecker ?? new InformationGainRatioCalculator <string>(shannonEntropy, shannonEntropy as ICategoricalImpurityMeasure <string>), bestSplitSelector as IBinaryBestSplitSelector ?? new BinarySplitSelectorForCategoricalOutcome(new BinaryDiscreteDataSplitter(), new BinaryNumericDataSplitter(), new ClassBreakpointsNumericSplitFinder()), leafBuilder ?? new CategoricalDecisionTreeLeafBuilder(), statisticalSignificanceChecker)); } return(new MultiSplitDecisionTreeModelBuilder( splitQualityChecker ?? new InformationGainRatioCalculator <string>(shannonEntropy, shannonEntropy as ICategoricalImpurityMeasure <string>), bestSplitSelector ?? new MultiValueSplitSelectorForCategoricalOutcome(new MultiValueDiscreteDataSplitter(), new BinaryNumericDataSplitter(), new DynamicProgrammingNumericSplitFinder()), leafBuilder ?? new CategoricalDecisionTreeLeafBuilder(), statisticalSignificanceChecker)); }
private IDecisionTreeModelBuilder BuildCustomModelBuilder( bool binary = false, ISplitQualityChecker splitQualityChecker = null, IBestSplitSelector bestSplitSelector = null, ILeafBuilder leafBuilder = null, IStatisticalSignificanceChecker statisticalSignificanceChecker = null) { if (binary) { return new BinaryDecisionTreeModelBuilder( splitQualityChecker ?? new InformationGainRatioCalculator<string>(shannonEntropy, shannonEntropy as ICategoricalImpurityMeasure<string>), bestSplitSelector as IBinaryBestSplitSelector ?? new BinarySplitSelectorForCategoricalOutcome(new BinaryDiscreteDataSplitter(), new BinaryNumericDataSplitter(), new ClassBreakpointsNumericSplitFinder()), leafBuilder ?? new CategoricalDecisionTreeLeafBuilder(), statisticalSignificanceChecker); } return new MultiSplitDecisionTreeModelBuilder( splitQualityChecker ?? new InformationGainRatioCalculator<string>(shannonEntropy, shannonEntropy as ICategoricalImpurityMeasure<string>), bestSplitSelector ?? new MultiValueSplitSelectorForCategoricalOutcome(new MultiValueDiscreteDataSplitter(), new BinaryNumericDataSplitter(), new DynamicProgrammingNumericSplitFinder()), leafBuilder ?? new CategoricalDecisionTreeLeafBuilder(), statisticalSignificanceChecker); }