Java 类weka.core.pmml.PMMLModel 实例源码

项目:autoweka    文件:AbstractPMMLClassifierTest.java   
public PMMLClassifier getClassifier(String name) {
  PMMLClassifier regression = null;
  try {
    PMMLModel model = 
      PMMLFactory.getPMMLModel(new BufferedInputStream(ClassLoader.getSystemResourceAsStream(
                "weka/classifiers/pmml/data/" + name)));

    regression = (PMMLClassifier)model;

  } catch (Exception ex) {
    ex.printStackTrace();
  }
  return regression;
}
项目:umple    文件:AbstractPMMLClassifierTest.java   
public PMMLClassifier getClassifier(String name) {
  PMMLClassifier regression = null;
  try {
    PMMLModel model = PMMLFactory.getPMMLModel(new BufferedInputStream(
      ClassLoader.getSystemResourceAsStream("weka/classifiers/pmml/data/"
        + name)));

    regression = (PMMLClassifier) model;

  } catch (Exception ex) {
    ex.printStackTrace();
  }
  return regression;
}
项目:pdi-weka-scoring-plugin    文件:WekaScoringModel.java   
/**
 * Set the log to pass on to the model. Only PMML models require logging.
 * 
 * @param log the log to use
 */
public void setLog(LogChannelInterface log) {
  if (getModel() instanceof PMMLModel) {
    LogAdapter logger = new LogAdapter(log);
    ((PMMLModel) getModel()).setLog(logger);
  }
}