本文整理匯總了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);
}
示例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);
}
示例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();
}
示例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;
}