@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<EarthModel> modelP = new ObjectParameter<>( EarthModel.MODEL_ID, EarthModel.class, SphericalVincentyEarthModel.class); if (config.grab(modelP)) { model = modelP.instantiateClass(config); } ObjectParameter<IndexFactory<O, ?>> innerP = new ObjectParameter<>( ProjectedIndex.Factory.Parameterizer.INDEX_ID, IndexFactory.class); if (config.grab(innerP)) { inner = innerP.instantiateClass(config); } Flag materializeF = new Flag(ProjectedIndex.Factory.Parameterizer.MATERIALIZE_FLAG); if (config.grab(materializeF)) { materialize = materializeF.isTrue(); } Flag norefineF = new Flag(ProjectedIndex.Factory.Parameterizer.DISABLE_REFINE_FLAG); if (config.grab(norefineF)) { norefine = norefineF.isTrue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); FileParameter fileP = new FileParameter(FILE_ID, FileParameter.FileType.INPUT_FILE); if (config.grab(fileP)) { file = fileP.getValue(); } PatternParameter idP = new PatternParameter(ID_ID, ID_PATTERN_DEFAULT); if (config.grab(idP)) { idpattern = idP.getValue(); } PatternParameter scoreP = new PatternParameter(SCORE_ID); if (config.grab(scoreP)) { scorepattern = scoreP.getValue(); } Flag inverstedF = new Flag(INVERTED_ID); if (config.grab(inverstedF)) { inverted = inverstedF.getValue(); } ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class, IdentityScaling.class); if (config.grab(scalingP)) { scaling = scalingP.instantiateClass(config); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter deltaP = new DoubleParameter(DELTA_ID); if (config.grab(deltaP)) { delta = deltaP.doubleValue(); } deltaP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE); IntParameter nP = new IntParameter(N_ID, 1); nP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if (config.grab(nP)) { n = nP.intValue(); } DoubleParameter alphaP = new DoubleParameter(ALPHA_ID, 1.); alphaP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_DOUBLE); if (config.grab(alphaP)) { alpha = alphaP.doubleValue(); } ObjectParameter<Distribution> distP = new ObjectParameter<>(DIST_ID, Distribution.class, UniformDistribution.class); if (config.grab(distP)) { dist = distP.instantiateClass(config); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<NumberVectorDistanceFunction<?>> distanceFunctionP = new ObjectParameter<>( EvaluateSilhouette.Parameterizer.DISTANCE_ID, NumberVectorDistanceFunction.class, EuclideanDistanceFunction.class); if (config.grab(distanceFunctionP)) { distance = distanceFunctionP.instantiateClass(config); } EnumParameter<NoiseHandling> noiseP = new EnumParameter<NoiseHandling>( EvaluateSilhouette.Parameterizer.NOISE_ID, NoiseHandling.class, NoiseHandling.TREAT_NOISE_AS_SINGLETONS); if (config.grab(noiseP)) { noiseOption = noiseP.getValue(); } if (noiseOption == NoiseHandling.IGNORE_NOISE) { Flag penalizeP = new Flag(EvaluateSilhouette.Parameterizer.NO_PENALIZE_ID); if (config.grab(penalizeP)) { penalize = penalizeP.isFalse(); } } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter quantileP = new DoubleParameter(QUANTILE_ID, 0.1) // .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE) // .addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE); if (config.grab(quantileP)) { quantile = quantileP.doubleValue(); } DoubleParameter samplingP = new DoubleParameter(SAMPLING_ID) // .addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE); if (config.grab(samplingP)) { sampling = samplingP.doubleValue(); } Flag nozerosF = new Flag(NOZEROS_ID); if (config.grab(nozerosF)) { nozeros = nozerosF.isTrue(); } RandomParameter randP = new RandomParameter(SEED_ID); if (config.grab(randP)) { rand = randP.getValue(); } }
@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(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter probP = new DoubleParameter(PROB_ID) // .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE) // .addConstraint(CommonConstraints.LESS_EQUAL_ONE_DOUBLE); if (config.grab(probP)) { prob = probP.getValue().doubleValue(); } RandomParameter rndP = new RandomParameter(SEED_ID); if (config.grab(rndP)) { rnd = rndP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final FileParameter MATRIX_PARAM = new FileParameter(MATRIX_ID, FileParameter.FileType.INPUT_FILE); if (config.grab(MATRIX_PARAM)) { matrixfile = MATRIX_PARAM.getValue(); } final ObjectParameter<DistanceParser> PARSER_PARAM = new ObjectParameter<>(PARSER_ID, DistanceParser.class, AsciiDistanceParser.class); if (config.grab(PARSER_PARAM)) { parser = PARSER_PARAM.instantiateClass(config); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<DistributionEstimator<D>> innerP = new ObjectParameter<>(INNER_ID, DistributionEstimator.class); if (config.grab(innerP)) { inner = innerP.instantiateClass(config); } DoubleParameter trimP = new DoubleParameter(TRIM_ID); trimP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE); trimP.addConstraint(CommonConstraints.LESS_THAN_HALF_DOUBLE); if (config.grab(trimP)) { trim = trimP.doubleValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final IntParameter pK = new IntParameter(K_ID) // .addConstraint(CommonConstraints.GREATER_THAN_ONE_INT); if (config.grab(pK)) { k = pK.getValue(); } final ObjectParameter<ReferencePointsHeuristic> refpP = new ObjectParameter<>( REFP_ID, ReferencePointsHeuristic.class, GridBasedReferencePoints.class); if (config.grab(refpP)) { refp = refpP.instantiateClass(config); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<PrimitiveDistanceFunction<NumberVector>> distanceFunctionP = new ObjectParameter<>( DISTANCE_ID, PrimitiveDistanceFunction.class, EuclideanDistanceFunction.class); if (config.grab(distanceFunctionP)) { distance = distanceFunctionP.instantiateClass(config); } EnumParameter<NoiseHandling> noiseP = new EnumParameter<NoiseHandling>( NOISE_ID, NoiseHandling.class, NoiseHandling.TREAT_NOISE_AS_SINGLETONS); if (config.grab(noiseP)) { noiseHandling = noiseP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final Flag flag = new Flag(INVERT_ID); if (config.grab(flag)) { invert = flag.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final DoubleParameter param = new DoubleParameter(D_ID); if (config.grab(param)) { eps = param.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleArrayListParameter meansP = new DoubleArrayListParameter(INITIAL_MEANS); if (config.grab(meansP)) { initialMeans = meansP.getValue().toArray(new double[0][]); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); IntParameter startP = new IntParameter(STARTK_ID, 3); if (config.grab(startP)) { startk = startP.intValue(); } IntParameter maxkP = new IntParameter(MAXK_ID, 20); if (config.grab(maxkP)) { maxk = maxkP.intValue(); } IntParameter samplesP = new IntParameter(SAMPLE_ID, 1000); if (config.grab(samplesP)) { samples = samplesP.intValue(); } RandomParameter seedP = new RandomParameter(SEED_ID); if (config.grab(seedP)) { rnd = seedP.getValue(); } IntParameter dimP = new IntParameter(DIM_ID); if (config.grab(dimP)) { dim = dimP.intValue(); } EnumParameter<Aggregate> aggP = new EnumParameter<>(AGGREGATE_ID, Aggregate.class, Aggregate.MED_MAD); if (config.grab(aggP)) { agg = aggP.getValue(); } EnumParameter<OutputFormat> formatP = new EnumParameter<>(FORMAT_ID, OutputFormat.class, OutputFormat.TABULAR); if (config.grab(formatP)) { format = formatP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<DistanceFunction<? super O>> distanceFunctionP = makeParameterDistanceFunction(EuclideanDistanceFunction.class, DistanceFunction.class); if (config.grab(distanceFunctionP)) { distanceFunction = distanceFunctionP.instantiateClass(config); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter palphaP = new DoubleParameter(EIGENPAIR_FILTER_PALPHA, DEFAULT_PALPHA); palphaP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE); palphaP.addConstraint(CommonConstraints.LESS_THAN_ONE_DOUBLE); if (config.grab(palphaP)) { palpha = palphaP.getValue(); } DoubleParameter walphaP = new DoubleParameter( WeakEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_WALPHA, DEFAULT_WALPHA); walphaP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE); if (config.grab(walphaP)) { walpha = walphaP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter dofP = new DoubleParameter(ChiSquaredDistribution.Parameterizer.DOF_ID); if (config.grab(dofP)) { dof = dofP.doubleValue(); } }
@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(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final DoubleParameter rmaxP = new DoubleParameter(RMAX_ID); if (config.grab(rmaxP)) { rmax = rmaxP.doubleValue(); } final IntParameter nminP = new IntParameter(NMIN_ID, 20); if (config.grab(nminP)) { nmin = nminP.intValue(); } final DoubleParameter alphaP = new DoubleParameter(ALPHA_ID, 0.5); if (config.grab(alphaP)) { alpha = alphaP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); EnumParameter<Linkage> linkageP = new EnumParameter<>(LINKAGE_ID, Linkage.class); linkageP.setDefaultValue(Linkage.WARD); if (config.grab(linkageP)) { linkage = linkageP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); IntParameter portP = new IntParameter(PORT_ID, port); portP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); portP.addConstraint(new LessEqualConstraint(65535)); if (config.grab(portP)) { this.port = portP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); generator = config.tryInstantiate(GeneratorXMLDatabaseConnection.class); // Output file outputFile = getParameterOutputFile( config, "The file to write the generated data set into, if the file already exists, the generated points will be appended to this file."); }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); DoubleParameter sparsP = new DoubleParameter(SPARSITY_ID); sparsP.setDefaultValue(3.); sparsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_DOUBLE); if (config.grab(sparsP)) { sparsity = sparsP.doubleValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); final IntParameter dimP = new IntParameter(DIM_ID) // .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_INT); if (config.grab(dimP)) { dim = dimP.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<ClusteringAlgorithm<?>> referencealgP = new ObjectParameter<>( REFERENCE_ID, ClusteringAlgorithm.class, ByLabelOrAllInOneClustering.class); if (config.grab(referencealgP)) { referencealg = referencealgP.instantiateClass(config); } Flag noiseSpecialHandlingF = new Flag(NOISE_ID); if (config.grab(noiseSpecialHandlingF)) { noiseSpecialHandling = noiseSpecialHandlingF.getValue(); } Flag selfPairingF = new Flag(SELFPAIR_ID); if (config.grab(selfPairingF)) { selfPairing = selfPairingF.getValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); IntParameter param = new IntParameter(K_ID) // .addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if (config.grab(param)) { k = param.intValue(); } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); input = config.tryInstantiate(InputStep.class); // Distance function parameter final ObjectParameter<DistanceFunction<O>> dpar = new ObjectParameter<>(DISTANCE_ID, DistanceFunction.class); if (config.grab(dpar)) { distance = dpar.instantiateClass(config); } final IntParameter kpar = new IntParameter(K_ID); kpar.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if (config.grab(kpar)) { k = kpar.intValue(); } // Output file parameter final FileParameter cpar = new FileParameter(CACHE_ID, FileParameter.FileType.OUTPUT_FILE); if (config.grab(cpar)) { out = cpar.getValue(); } }
@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."); } } }
@Override protected void makeOptions(Parameterization config) { super.makeOptions(config); ObjectParameter<DimensionSelectingSubspaceDistanceFunction<V>> param = new ObjectParameter<>( DISTANCE_FUNCTION_ID, DimensionSelectingSubspaceDistanceFunction.class, SubspaceEuclideanDistanceFunction.class); if (config.grab(param)) { distance = param.instantiateClass(config); } DoubleParameter epsilonP = new DoubleParameter(EPSILON_ID); if (config.grab(epsilonP)) { epsilon = epsilonP.getValue(); } IntParameter minptsP = new IntParameter(MINPTS_ID); minptsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT); if (config.grab(minptsP)) { minpts = minptsP.getValue(); } }