本文整理汇总了Java中com.rapidminer.operator.learner.CapabilityProvider类的典型用法代码示例。如果您正苦于以下问题:Java CapabilityProvider类的具体用法?Java CapabilityProvider怎么用?Java CapabilityProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CapabilityProvider类属于com.rapidminer.operator.learner包,在下文中一共展示了CapabilityProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doWork
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
/**
* Trains a model using an ExampleSet from the input. Uses the method learn(ExampleSet).
*/
@Override
public void doWork() throws OperatorException {
ExampleSet exampleSet = exampleSetInput.getData(ExampleSet.class);
// some checks
if (exampleSet.getAttributes().getLabel() == null) {
throw new UserError(this, 105, new Object[0]);
}
if (exampleSet.getAttributes().size() == 0) {
throw new UserError(this, 106, new Object[0]);
}
// check capabilities and produce errors if they are not fulfilled
CapabilityCheck check = new CapabilityCheck(this, Tools.booleanValue(
ParameterService.getParameterValue(CapabilityProvider.PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN), true));
check.checkLearnerCapabilities(this, exampleSet);
Model model = learn(exampleSet);
modelOutput.deliver(model);
exampleSetOutput.deliver(exampleSet);
}
示例2: doWork
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
@Override
public void doWork() throws OperatorException {
ExampleSet exampleSet = exampleSetInput.getData(ExampleSet.class);
// some checks
if (exampleSet.getAttributes().getLabel() == null) {
throw new UserError(this, 105, new Object[0]);
}
if (exampleSet.getAttributes().size() == 0) {
throw new UserError(this, 106, new Object[0]);
}
// check if the label attribute contains any missing values
Attribute labelAtt = exampleSet.getAttributes().getLabel();
exampleSet.recalculateAttributeStatistics(labelAtt);
if (exampleSet.getStatistics(labelAtt, Statistics.UNKNOWN) > 0) {
throw new UserError(this, 162, labelAtt.getName());
}
// check capabilities and produce errors if they are not fulfilled
CapabilityCheck check = new CapabilityCheck(this, Tools.booleanValue(
ParameterService.getParameterValue(CapabilityProvider.PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN), true));
check.checkLearnerCapabilities(this, exampleSet);
Model model = learn(exampleSet);
modelOutput.deliver(model);
}
示例3: createCapabilitiesPanel
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public static JPanel createCapabilitiesPanel(Operator operator) {
CapabilityProvider capabilityProvider = (CapabilityProvider) operator;
int length = OperatorCapability.values().length;
GridLayout layout = new GridLayout(length / 2, 2);
layout.setHgap(GAP);
layout.setVgap(GAP);
JPanel capabilitiesPanel = new JPanel(layout);
for (OperatorCapability capability : OperatorCapability.values()) {
JLabel capabilityLabel = new JLabel(capability.getDescription());
try {
if (capabilityProvider.supportsCapability(capability)) {
capabilityLabel.setIcon(SwingTools.createIcon("16/ok.png"));
} else {
capabilityLabel.setIcon(SwingTools.createIcon("16/error.png"));
}
} catch (Exception e) {
break;
}
capabilitiesPanel.add(capabilityLabel);
}
return capabilitiesPanel;
}
示例4: LearnerPrecondition
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public LearnerPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
super(capabilityProvider, inputPort);
}
示例5: CapabilityPrecondition
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public CapabilityPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
super(inputPort);
this.capabilityProvider = capabilityProvider;
}
示例6: LearnerPrecondition
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public LearnerPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
super(capabilityProvider, inputPort);
}
示例7: CapabilityPrecondition
import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public CapabilityPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
super(inputPort);
this.capabilityProvider = capabilityProvider;
}