本文整理汇总了Java中de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java IntParameter.getValue方法的具体用法?Java IntParameter.getValue怎么用?Java IntParameter.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter
的用法示例。
在下文中一共展示了IntParameter.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
PatternParameter positiveClassNameP = new PatternParameter(POSITIVE_CLASS_NAME_ID);
positiveClassNameP.setOptional(true);
if(config.grab(positiveClassNameP)) {
positiveClassName = positiveClassNameP.getValue();
}
IntParameter binsP = new IntParameter(BINS_ID, 50);
binsP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(binsP)) {
bins = binsP.getValue();
}
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class, IdentityScaling.class);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
Flag splitfreqF = new Flag(SPLITFREQ_ID);
if(config.grab(splitfreqF)) {
splitfreq = splitfreqF.getValue();
}
}
示例2: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
DoubleParameter minsuppP = new DoubleParameter(MINSUPP_ID) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(minsuppP)) {
minsupp = minsuppP.getValue();
}
IntParameter minlengthP = new IntParameter(MINLENGTH_ID) //
.setOptional(true) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minlengthP)) {
minlength = minlengthP.getValue();
}
IntParameter maxlengthP = new IntParameter(MAXLENGTH_ID) //
.setOptional(true) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(maxlengthP)) {
maxlength = maxlengthP.getValue();
}
}
示例3: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
IntParameter dimlatP = new IntParameter(LATDIM_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
if(config.grab(dimlatP)) {
dimlat = dimlatP.getValue();
}
IntParameter dimlngP = new IntParameter(LNGDIM_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
if(config.grab(dimlngP)) {
dimlng = dimlngP.getValue();
}
// Non-formalized parameter constraint:
if(dimlat == dimlng) {
config.reportError(new WrongParameterValueException("Parameters " + dimlatP.getName() + " and " + dimlngP.getName() + " should be different columns."));
}
ObjectParameter<EarthModel> modelP = new ObjectParameter<>(EarthModel.MODEL_ID, EarthModel.class, SphericalVincentyEarthModel.class);
if(config.grab(modelP)) {
model = modelP.instantiateClass(config);
}
}
示例4: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
IntParameter samplesizeP = new IntParameter(N_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(samplesizeP)) {
samplesize = samplesizeP.getValue();
}
DoubleParameter scaleP = new DoubleParameter(SCALE_ID, 1.0) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(scaleP)) {
scale = scaleP.getValue();
}
RandomParameter randomP = new RandomParameter(RANDOM_ID);
if(config.grab(randomP)) {
rnd = randomP.getValue();
}
}
示例5: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
final IntParameter kP = new IntParameter(K_ID);
kP.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(kP)) {
k = kP.getValue();
}
final DoubleParameter samplingP = new DoubleParameter(SAMPLING_ID);
samplingP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
samplingP.addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE);
samplingP.setOptional(true);
if(config.grab(samplingP)) {
sampling = samplingP.getValue();
}
final RandomParameter rndP = new RandomParameter(SEED_ID);
if(config.grab(rndP)) {
seed = rndP.getValue();
}
final Flag includeP = new Flag(INCLUDESELF_ID);
if(config.grab(includeP)) {
includeSelf = includeP.isTrue();
}
}
示例6: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
IntParameter kP = new IntParameter(K_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(kP)) {
k = kP.getValue();
}
DoubleParameter percentageP = new DoubleParameter(SAMPLING_ID, 1.) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(percentageP)) {
percentage = percentageP.getValue();
}
RandomParameter randomP = new RandomParameter(SEED_ID);
if(config.grab(randomP)) {
rnd = randomP.getValue();
}
}
示例7: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
final IntParameter pK = new IntParameter(K_ID);
pK.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(pK)) {
k = pK.getValue();
}
ObjectParameter<KernelDensityFunction> kernelP = new ObjectParameter<>(KERNEL_ID, KernelDensityFunction.class, GaussianKernelDensityFunction.class);
if(config.grab(kernelP)) {
kernel = kernelP.instantiateClass(config);
}
DoubleParameter hP = new DoubleParameter(H_ID);
if(config.grab(hP)) {
h = hP.doubleValue();
}
DoubleParameter cP = new DoubleParameter(C_ID, 0.1);
if(config.grab(cP)) {
c = cP.doubleValue();
}
}
示例8: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
DoubleParameter epsilonP = new DoubleParameter(EPSILON_ID) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(epsilonP)) {
epsilon = epsilonP.getValue();
}
IntParameter minptsP = new IntParameter(MINPTS_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minptsP)) {
minpts = minptsP.getValue();
if(minpts <= 2) {
LOG.warning("DBSCAN with minPts <= 2 is equivalent to single-link clustering at a single height. Consider using larger values of minPts.");
}
}
}
示例9: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectListParameter<SpatialSorter> curveP = new ObjectListParameter<>(CURVES_ID, SpatialSorter.class);
if(config.grab(curveP)) {
curvegen = curveP.instantiateClasses(config);
}
DoubleParameter windowP = new DoubleParameter(WINDOW_ID, 10.0);
if(config.grab(windowP)) {
window = windowP.getValue();
}
IntParameter variantsP = new IntParameter(VARIANTS_ID, 1);
variantsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(variantsP)) {
variants = variantsP.getValue();
}
RandomParameter randomP = new RandomParameter(RANDOM_ID);
if(config.grab(randomP)) {
random = randomP.getValue();
}
}
示例10: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
final IntParameter kP = new IntParameter(K_ID)//
.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(kP)) {
k = kP.getValue();
}
final IntParameter phiP = new IntParameter(PHI_ID)//
.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(phiP)) {
phi = phiP.getValue();
}
}
示例11: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<PageFileFactory<Page>> pffP = new ObjectParameter<>(PAGEFILE_ID, PageFileFactory.class, PersistentPageFileFactory.class);
if(config.grab(pffP)) {
pageFileFactory = pffP.instantiateClass(config);
}
IntParameter cacheSizeP = new IntParameter(CACHE_SIZE_ID);
cacheSizeP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT);
if(config.grab(cacheSizeP)) {
cacheSize = cacheSizeP.getValue();
}
}
示例12: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
public void makeOptions(Parameterization config) {
super.makeOptions(config);
DoubleParameter epsilonP = new DoubleParameter(DBSCAN.Parameterizer.EPSILON_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE);
if(config.grab(epsilonP)) {
epsilon = epsilonP.doubleValue();
}
IntParameter minPtsP = new IntParameter(DBSCAN.Parameterizer.MINPTS_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minPtsP)) {
minPts = minPtsP.intValue();
}
IntParameter sampleSizep = new IntParameter(FDBSCANNeighborPredicate.Parameterizer.SAMPLE_SIZE_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(sampleSizep)) {
sampleSize = sampleSizep.getValue();
}
DoubleParameter thresholdp = new DoubleParameter(FDBSCANNeighborPredicate.Parameterizer.THRESHOLD_ID, 0.5) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE) //
.addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE);
if(config.grab(thresholdp)) {
threshold = thresholdp.getValue();
}
RandomParameter seedp = new RandomParameter(FDBSCANNeighborPredicate.Parameterizer.SEED_ID);
if(config.grab(seedp)) {
seed = seedp.getValue();
}
}
示例13: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
final IntParameter kP = new IntParameter(K_ID, 5);
if(config.grab(kP)) {
k = kP.getValue();
}
final IntParameter nP = new IntParameter(N_ID, 10);
if(config.grab(nP)) {
n = nP.getValue();
}
final IntParameter hP = new IntParameter(H_ID, 32);
if(config.grab(hP)) {
h = hP.getValue();
}
ObjectParameter<LPNormDistanceFunction> distP = AbstractDistanceBasedAlgorithm.makeParameterDistanceFunction(EuclideanDistanceFunction.class, LPNormDistanceFunction.class);
if(config.grab(distP)) {
distfunc = distP.instantiateClass(config);
}
final EnumParameter<ScoreType> tnP = new EnumParameter<>(TN_ID, ScoreType.class, ScoreType.TopN);
if(config.grab(tnP)) {
tn = tnP.getValue();
}
}
示例14: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
final IntParameter param = new IntParameter(HISTOGRAM_BINS_ID, 100);
param.addConstraint(CommonConstraints.GREATER_THAN_ONE_INT);
if(config.grab(param)) {
numbins = param.getValue();
}
}
示例15: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
RandomParameter rndP = new RandomParameter(SEED_ID);
if(config.grab(rndP)) {
rnd = rndP.getValue();
}
DoubleParameter deltaP = new DoubleParameter(DELTA_ID, 0.001) //
.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(deltaP)) {
delta = deltaP.getValue();
}
DoubleParameter rhoP = new DoubleParameter(RHO_ID, 1) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE);
if(config.grab(rhoP)) {
rho = rhoP.getValue();
}
Flag initialP = new Flag(INITIAL_ID);
if(config.grab(initialP)) {
noInitialNeighbors = initialP.isTrue();
}
IntParameter iterP = new IntParameter(ITER_ID, 100) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(iterP)) {
iterations = iterP.getValue();
}
}