当前位置: 首页>>代码示例>>Java>>正文


Java CapabilityProvider类代码示例

本文整理汇总了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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:AbstractMetaLearner.java

示例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);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:RelevanceTreeLearner.java

示例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;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:OperatorInfoScreen.java

示例4: LearnerPrecondition

import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public LearnerPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
	super(capabilityProvider, inputPort);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:4,代码来源:LearnerPrecondition.java

示例5: CapabilityPrecondition

import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public CapabilityPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
	super(inputPort);
	this.capabilityProvider = capabilityProvider;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:CapabilityPrecondition.java

示例6: LearnerPrecondition

import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public LearnerPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
	super(capabilityProvider, inputPort);		
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:4,代码来源:LearnerPrecondition.java

示例7: CapabilityPrecondition

import com.rapidminer.operator.learner.CapabilityProvider; //导入依赖的package包/类
public CapabilityPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort) {
    super(inputPort);
    this.capabilityProvider = capabilityProvider;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:5,代码来源:CapabilityPrecondition.java


注:本文中的com.rapidminer.operator.learner.CapabilityProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。