java utility 是什么_Java Utility类代码示例

此博客展示了Java中与Utility相关的代码,导入了com.rapidminer.operator.learner.igss.utility.Utility包,重写了getParameterTypes方法,设置了多种参数类型,包括整数、布尔、双精度等类型的参数,用于不同的功能配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

import com.rapidminer.operator.learner.igss.utility.Utility; //导入依赖的package包/类

@Override

public List getParameterTypes() {

List types = super.getParameterTypes();

ParameterType type = new ParameterTypeInt(PARAMETER_ITERATIONS, "the number of iterations", 1, 50, 10);

type.setExpert(false);

types.add(type);

type = new ParameterTypeBoolean(PARAMETER_FORCE_ITERATIONS,

"make all iterations even if termination criterion is met", false);

type.setExpert(false);

types.add(type);

types.add(new ParameterTypeDouble(PARAMETER_EPSILON, "approximation parameter", 0.01, 1.0, 0.04));

types.add(new ParameterTypeDouble(PARAMETER_DELTA, "desired confidence", 0.01, 1.0, 0.1));

types.add(new ParameterTypeDouble(PARAMETER_MIN_UTILITY_PRUNING, "minimum utility used for pruning", -1.0d, 1.0d,

0.0d));

types.add(new ParameterTypeDouble(PARAMETER_MIN_UTILITY_USEFUL, "minimum utility for the usefulness of a rule",

-1.0, 1.0, 0.0d));

types.add(new ParameterTypeInt(PARAMETER_STEPSIZE, "the number of examples drawn before the next hypothesis update",

1, 10000, 100));

types.add(new ParameterTypeInt(PARAMETER_LARGE,

"the number of examples a hypothesis must cover before normal approximation is used", 1, 10000, 100));

types.add(new ParameterTypeInt(PARAMETER_MAX_COMPLEXITY, "the maximum complexity of hypothesis", 1, 10, 1));

types.add(new ParameterTypeInt(PARAMETER_MIN_COMPLEXITY, "the minimum complexity of hypothesis", 1, 10, 1));

types.add(new ParameterTypeBoolean(PARAMETER_USE_BINOMIAL,

"Switch to binomial utility funtion before increasing complexity", false));

types.add(new ParameterTypeCategory(PARAMETER_UTILITY_FUNCTION, "the utility function to be used",

Utility.UTILITY_TYPES, 4));

types.add(new ParameterTypeBoolean(PARAMETER_USE_KBS, "use kbs to reweight examples after each iteration", true));

types.add(new ParameterTypeBoolean(PARAMETER_REJECTION_SAMPLING,

"use rejection sampling instead of weighted examples", true));

types.add(new ParameterTypeCategory(PARAMETER_USEFUL_CRITERION,

"criterion to decide if the complexity is increased ", IteratingGSS.CRITERION_TYPES, 1));

types.add(new ParameterTypeDouble(PARAMETER_EXAMPLE_FACTOR,

"used by example criterion to determine usefulness of a hypothesis", 1.0, 5.0, 1.5));

types.add(new ParameterTypeBoolean(PARAMETER_GENERATE_ALL_HYPOTHESIS, "generate h->Y+/Y- or h->Y+ only.", false));

types.add(new ParameterTypeBoolean(PARAMETER_RESET_WEIGHTS, "Set weights back to 1 when complexity is increased.",

false));

return types;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值