本文整理汇总了Java中com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix类的典型用法代码示例。如果您正苦于以下问题:Java OperatorInsertionQuickFix类的具体用法?Java OperatorInsertionQuickFix怎么用?Java OperatorInsertionQuickFix使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OperatorInsertionQuickFix类属于com.rapidminer.operator.ports.quickfix包,在下文中一共展示了OperatorInsertionQuickFix类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createToBinominalFix
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
/**
* Creates a quickfix to convert to nominal.
*
* @param labelName
* If null, regular attributes will be converted. Otherwise the special attribute
* with the given name will be converted.
*/
protected QuickFix createToBinominalFix(final String labelName) {
return new OperatorInsertionQuickFix("insert_nominal_to_binominal_" + (labelName != null ? "label" : "attributes"),
new Object[0], 10, getInputPort()) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(NominalToBinominal.class);
if (labelName != null) {
op.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE,
AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_SINGLE]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(SingleAttributeFilter.PARAMETER_ATTRIBUTE, labelName);
}
return op;
}
};
}
示例2: createToNumericalFix
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
/**
* Creates a quickfix to convert to numerical.
*
* @param labelName
* If null, regular attributes will be converted. Otherwise the special attribute
* with the given name will be converted.
*/
protected QuickFix createToNumericalFix(final String labelName) {
return new OperatorInsertionQuickFix("insert_nominal_to_numerical_" + (labelName != null ? "label" : "attributes"),
new Object[0], 10, getInputPort()) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(NominalToNumeric.class);
if (labelName != null) {
op.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE,
AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_REGULAR_EXPRESSION]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(RegexpAttributeFilter.PARAMETER_REGULAR_EXPRESSION, labelName);
}
return op;
}
};
}
示例3: createDiscretizationFixes
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
public static List<QuickFix> createDiscretizationFixes(final InputPort inputPort, final String labelName) {
List<QuickFix> fixes = new LinkedList<QuickFix>();
for (final Class<? extends AbstractDiscretizationOperator> dclass : ALL_DISCRETIZATION_OPERATORS) {
String name = dclass.getName();
OperatorDescription ods[] = OperatorService.getOperatorDescriptions(dclass);
if (ods.length > 0) {
name = ods[0].getName();
}
fixes.add(new OperatorInsertionQuickFix("insert_discretization", new Object[] { name }, 10, inputPort) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(dclass);
if (labelName != null) {
op.setParameter(
AttributeSubsetSelector.PARAMETER_FILTER_TYPE,
AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_REGULAR_EXPRESSION]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(RegexpAttributeFilter.PARAMETER_REGULAR_EXPRESSION, labelName);
}
return op;
}
});
}
return fixes;
}
示例4: createDiscretizationFixes
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
public static List<QuickFix> createDiscretizationFixes(final InputPort inputPort, final String labelName) {
List<QuickFix> fixes = new LinkedList<QuickFix>();
for (final Class<? extends AbstractDiscretizationOperator> dclass : ALL_DISCRETIZATION_OPERATORS) {
String name = dclass.getName();
OperatorDescription ods[] = OperatorService.getOperatorDescriptions(dclass);
if (ods.length > 0) {
name = ods[0].getName();
}
fixes.add(new OperatorInsertionQuickFix("insert_discretization", new Object[] { name }, 10, inputPort) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(dclass);
if (labelName != null) {
op.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE, AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_REGULAR_EXPRESSION]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(RegexpAttributeFilter.PARAMETER_REGULAR_EXPRESSION, labelName);
}
return op;
}
});
}
return fixes;
}
示例5: createToBinominalFix
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
/** Creates a quickfix to convert to nominal.
* @param labelName If null, regular attributes will be converted. Otherwise the special attribute with the given name will be converted. */
protected QuickFix createToBinominalFix(final String labelName) {
return new OperatorInsertionQuickFix("insert_nominal_to_binominal_" + ((labelName != null) ? "label" : "attributes"), new Object[0], 10, getInputPort()) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(NominalToBinominal.class);
if (labelName != null) {
op.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE, AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_SINGLE]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(SingleAttributeFilter.PARAMETER_ATTRIBUTE, labelName);
}
return op;
}
};
}
示例6: createToNumericalFix
import com.rapidminer.operator.ports.quickfix.OperatorInsertionQuickFix; //导入依赖的package包/类
/** Creates a quickfix to convert to numerical.
* @param labelName If null, regular attributes will be converted. Otherwise the special attribute with the given name will be converted. */
protected QuickFix createToNumericalFix(final String labelName) {
return new OperatorInsertionQuickFix("insert_nominal_to_numerical_" + ((labelName != null) ? "label" : "attributes"), new Object[0], 10, getInputPort()) {
@Override
public Operator createOperator() throws OperatorCreationException {
Operator op = OperatorService.createOperator(NominalToNumeric.class);
if (labelName != null) {
op.setParameter(AttributeSubsetSelector.PARAMETER_FILTER_TYPE, AttributeSubsetSelector.CONDITION_NAMES[AttributeSubsetSelector.CONDITION_REGULAR_EXPRESSION]);
op.setParameter(AttributeSubsetSelector.PARAMETER_INCLUDE_SPECIAL_ATTRIBUTES, "true");
op.setParameter(RegexpAttributeFilter.PARAMETER_REGULAR_EXPRESSION, labelName);
}
return op;
}
};
}