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


Java OperatorInsertionQuickFix类代码示例

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

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

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

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

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

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


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