當前位置: 首頁>>代碼示例>>Java>>正文


Java GenerationException.getMessage方法代碼示例

本文整理匯總了Java中com.rapidminer.generator.GenerationException.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java GenerationException.getMessage方法的具體用法?Java GenerationException.getMessage怎麽用?Java GenerationException.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.rapidminer.generator.GenerationException的用法示例。


在下文中一共展示了GenerationException.getMessage方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: startVisualization

import com.rapidminer.generator.GenerationException; //導入方法依賴的package包/類
@Override
public void startVisualization(Object id) {
	int index = 0;
	if (id instanceof String) {
		String idString = (String) id;
		index = Integer.parseInt(idString.substring(0, idString.indexOf("(")).trim());
	} else {
		index = ((Double) id).intValue();
	}
	AggregationIndividual individual = lastPopulation.get(index);
	ExampleSet es = null;
	try {
		es = individual.createExampleSet(originalExampleSet, allAttributes, generator);
	} catch (GenerationException e) {
		throw new RuntimeException("Cannot visualize individual '" + index + "': " + e.getMessage());
	}
	Component visualizationComponent = ResultDisplayTools.createVisualizationComponent(es, null, es.getName());
	JFrame frame = new JFrame();
	frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	frame.getContentPane().setLayout(new BorderLayout());
	frame.getContentPane().add(new ExtendedJScrollPane(visualizationComponent), BorderLayout.CENTER);
	frame.setSize(600, 400);
	frame.setLocationRelativeTo(null);
	frame.setVisible(true);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:26,代碼來源:AggregationPopulationPlotter.java

示例2: startVisualization

import com.rapidminer.generator.GenerationException; //導入方法依賴的package包/類
public void startVisualization(Object id) {
	int index = 0;
	if (id instanceof String) {
		String idString = (String) id;
		index = Integer.parseInt(idString.substring(0, idString.indexOf("(")).trim());
	} else
		index = ((Double) id).intValue();
	AggregationIndividual individual = lastPopulation.get(index);
	ExampleSet es = null;
	try {
		es = individual.createExampleSet(originalExampleSet, allAttributes, generator);
	} catch (GenerationException e) {
		throw new RuntimeException("Cannot visualize individual '" + index + "': " + e.getMessage());
	}
	Component visualizationComponent = ResultDisplayTools.createVisualizationComponent(es, null, es.getName());
	JFrame frame = new JFrame();
	frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	frame.getContentPane().setLayout(new BorderLayout());
	frame.getContentPane().add(new ExtendedJScrollPane(visualizationComponent), BorderLayout.CENTER);
	frame.setSize(600, 400);
	frame.setLocationRelativeTo(null);
	frame.setVisible(true);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:24,代碼來源:AggregationPopulationPlotter.java

示例3: doWork

import com.rapidminer.generator.GenerationException; //導入方法依賴的package包/類
@Override
public void doWork() throws OperatorException {		
	AbstractExpressionParser parser = ExpressionParserFactory.getExpressionParser(getParameterAsBoolean(PARAMETER_USE_STANDARD_CONSTANTS), getProcess());
	Iterator<String[]> j = getParameterList(PARAMETER_FUNCTIONS).iterator();
	while (j.hasNext()) {
		String[] nameFunctionPair = j.next();
		String name = nameFunctionPair[0];
		String function = nameFunctionPair[1];

		try {
			parser.addMacro(getProcess().getMacroHandler(), name, function);
		} catch (GenerationException e) {
			throw new UserError(this, 108, e.getMessage());
		}
	}

	dummyPorts.passDataThrough();
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:19,代碼來源:MacroConstructionOperator.java

示例4: createExampleSet

import com.rapidminer.generator.GenerationException; //導入方法依賴的package包/類
@Override
  public ExampleSet createExampleSet() throws OperatorException {
AbstractExpressionParser parser = ExpressionParserFactory.getExpressionParser(true);

      MemoryExampleTable table = new MemoryExampleTable();
      table.addDataRow(new DoubleArrayDataRow(new double[0]));

      ExampleSet exampleSet = table.createExampleSet();
      Iterator<String[]> j = getParameterList(PARAMETER_VALUES).iterator();
      while (j.hasNext()) {
          String[] nameFunctionPair = j.next();
          String name = nameFunctionPair[0];
          String function = nameFunctionPair[1];
          try {
              parser.addAttribute(exampleSet, name, function);
          } catch (GenerationException e) {
              throw new UserError(this, e, 108, e.getMessage());
          }

          checkForStop();
      }

      // now set roles
      if (isParameterSet(PARAMETER_ROLES)) {
          List<String[]> list = getParameterList(PARAMETER_ROLES);
          for (String[] pairs: list) {
              setRole(exampleSet, pairs[0], pairs[1]);
          }
      }
      return exampleSet;
  }
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:32,代碼來源:UserSpecificationDataGenerator.java


注:本文中的com.rapidminer.generator.GenerationException.getMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。