本文整理汇总了Java中de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm.ALGORITHM_ID属性的典型用法代码示例。如果您正苦于以下问题:Java AbstractAlgorithm.ALGORITHM_ID属性的具体用法?Java AbstractAlgorithm.ALGORITHM_ID怎么用?Java AbstractAlgorithm.ALGORITHM_ID使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
的用法示例。
在下文中一共展示了AbstractAlgorithm.ALGORITHM_ID属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
// Get database connection.
final ObjectParameter<DatabaseConnection> dbcP = new ObjectParameter<>(AbstractDatabase.Parameterizer.DATABASE_CONNECTION_ID, DatabaseConnection.class, FileBasedDatabaseConnection.class);
if(config.grab(dbcP)) {
databaseConnection = dbcP.instantiateClass(config);
}
// Get indexes.
final ObjectListParameter<IndexFactory<?, ?>> indexFactoryP = new ObjectListParameter<>(AbstractDatabase.Parameterizer.INDEX_ID, IndexFactory.class, true);
if(config.grab(indexFactoryP)) {
indexFactories = indexFactoryP.instantiateClasses(config);
}
ObjectParameter<Classifier<O>> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, Classifier.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
ObjectParameter<Holdout> holdoutP = new ObjectParameter<>(HOLDOUT_ID, Holdout.class, StratifiedCrossValidation.class);
if(config.grab(holdoutP)) {
holdout = holdoutP.instantiateClass(config);
}
}
示例2: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<HierarchicalClusteringAlgorithm> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, HierarchicalClusteringAlgorithm.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
IntParameter minclustersP = new IntParameter(MINCLUSTERSIZE_ID, 1) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minclustersP)) {
minClSize = minclustersP.intValue();
}
Flag hierarchicalF = new Flag(HIERARCHICAL_ID);
if(config.grab(hierarchicalF)) {
hierarchical = hierarchicalF.isTrue();
}
}
示例3: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<HierarchicalClusteringAlgorithm> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, HierarchicalClusteringAlgorithm.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
IntParameter numClP = new IntParameter(K_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(numClP)) {
numCl = numClP.intValue();
}
IntParameter minclustersP = new IntParameter(MINCLUSTERSIZE_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minclustersP)) {
minClSize = minclustersP.intValue();
}
}
示例4: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectListParameter<OutlierAlgorithm> algP = new ObjectListParameter<>(AbstractAlgorithm.ALGORITHM_ID, OutlierAlgorithm.class);
if (config.grab(algP)) {
ListParameterization subconfig = new ListParameterization();
ChainedParameterization chain = new ChainedParameterization(subconfig, config);
chain.errorsTo(config);
algorithms = algP.instantiateClasses(chain);
subconfig.logAndClearReportedErrors();
}
ObjectParameter<EnsembleVoting> votingP = new ObjectParameter<>(VOTING_ID, EnsembleVoting.class);
if (config.grab(votingP)) {
voting = votingP.instantiateClass(config);
}
}
示例5: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<HierarchicalClusteringAlgorithm> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, HierarchicalClusteringAlgorithm.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
Flag hierarchicalF = new Flag(HIERARCHICAL_ID);
if(config.grab(hierarchicalF)) {
hierarchical = hierarchicalF.isTrue();
}
}
示例6: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<HierarchicalClusteringAlgorithm> algorithmP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, HierarchicalClusteringAlgorithm.class);
if(config.grab(algorithmP)) {
algorithm = algorithmP.instantiateClass(config);
}
IntParameter minclustersP = new IntParameter(MINCLUSTERSIZE_ID, 1) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minclustersP)) {
minClSize = minclustersP.intValue();
}
}
示例7: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<KMeans<?, KMeansModel>> kmeansP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, KMeans.class, KMeansHamerly.class);
if(config.grab(kmeansP)) {
kmeans = kmeansP.instantiateClass(config);
}
}
示例8: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<ClusteringAlgorithm<C>> palgorithm = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, ClusteringAlgorithm.class);
if(config.grab(palgorithm)) {
inner = palgorithm.instantiateClass(config);
if(inner != null && inner.getInputTypeRestriction().length > 0 && //
!inner.getInputTypeRestriction()[0].isAssignableFromType(TypeUtil.NUMBER_VECTOR_FIELD)) {
config.reportError(new WrongParameterValueException(palgorithm, palgorithm.getValueAsString(), "The inner clustering algorithm (as configured) does not accept numerical vectors: " + inner.getInputTypeRestriction()[0]));
}
}
}
示例9: makeOptions
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
ObjectParameter<Algorithm> algP = new ObjectParameter<>(AbstractAlgorithm.ALGORITHM_ID, OutlierAlgorithm.class);
if(config.grab(algP)) {
algorithm = algP.instantiateClass(config);
}
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
}