我正在尝试访问从 PART 规则算法生成的规则。我了解 PART 依次从 J48 决策树转换节点。我需要分别访问每个规则并显示相同的内容。
PART part1=new PART();
Instances instance1= new Instances(new BufferedReader(new FileReader("sample.arff")));
d1.setClassIndex(instance1.numAttributes()-1);
part1.setUnpruned(false);
part1.setNumFolds(5);
part1.setMinNumObj(2);
part1.setReducedErrorPruning(true);
part1.setConfidenceFactor(0.25f);
part1.setBinarySplits(true);
part1.buildClassifier(instance1);
part1 的属性 m_root 是私有的。我无法访问此请建议或指导我正确的方向
谢谢你们