Examples of tryInstantiate()


Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

    ListParameterization opticsconfig = new ListParameterization(opticsAlgorithmParameters);
    opticsconfig.addParameter(OPTICS.DISTANCE_FUNCTION_ID, ProxyDistanceFunction.proxy(dishDistanceQuery));

    Class<OPTICS<V, PreferenceVectorBasedCorrelationDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(OPTICS.class);
    OPTICS<V, PreferenceVectorBasedCorrelationDistance> optics = null;
    optics = opticsconfig.tryInstantiate(cls);
    ClusterOrderResult<PreferenceVectorBasedCorrelationDistance> opticsResult = optics.run(database, relation);

    if(logger.isVerbose()) {
      logger.verbose("*** Compute Clusters.");
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

   */
  public ClusteringAlgorithm<Clustering<Model>> getPartitionAlgorithm(DistanceQuery<V, D> query) {
    ListParameterization reconfig = new ListParameterization(partitionAlgorithmParameters);
    ProxyDistanceFunction<V, D> dist = ProxyDistanceFunction.proxy(query);
    reconfig.addParameter(AbstractDistanceBasedAlgorithm.DISTANCE_FUNCTION_ID, dist);
    ClusteringAlgorithm<Clustering<Model>> instance = reconfig.tryInstantiate(partitionAlgorithm);
    reconfig.failOnErrors();
    return instance;
  }

  /**
 
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

    ListParameterization parameters = new ListParameterization();
    parameters.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, FirstNEigenPairFilter.class.getName());
    parameters.addParameter(FirstNEigenPairFilter.EIGENPAIR_FILTER_N, Integer.toString(dim - 1));
    DependencyDerivator<DoubleVector, DoubleDistance> derivator = null;
    Class<DependencyDerivator<DoubleVector, DoubleDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(DependencyDerivator.class);
    derivator = parameters.tryInstantiate(cls);

    CorrelationAnalysisSolution<DoubleVector> model = derivator.run(derivatorDB);

    Matrix weightMatrix = model.getSimilarityMatrix();
    DoubleVector centroid = new DoubleVector(model.getCentroid());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

      ListParameterization parameters = new ListParameterization();
      parameters.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, FirstNEigenPairFilter.class.getName());
      parameters.addParameter(FirstNEigenPairFilter.EIGENPAIR_FILTER_N, Integer.toString(dimensionality));
      DependencyDerivator<DoubleVector, DoubleDistance> derivator = null;
      Class<DependencyDerivator<DoubleVector, DoubleDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(DependencyDerivator.class);
      derivator = parameters.tryInstantiate(cls);

      CorrelationAnalysisSolution<DoubleVector> model = derivator.run(derivatorDB);
      LinearEquationSystem les = model.getNormalizedLinearEquationSystem(null);
      return les;
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

        // big value
        pcaParameters.addParameter(PCAFilteredRunner.BIG_ID, 50);
        // small value
        pcaParameters.addParameter(PCAFilteredRunner.SMALL_ID, 1);
        Class<PCAFilteredRunner<V>> cls = ClassGenericsUtil.uglyCastIntoSubclass(PCAFilteredRunner.class);
        pca = pcaParameters.tryInstantiate(cls);
        for(ParameterException e : pcaParameters.getErrors()) {
          LoggingUtil.warning("Error in internal parameterization: " + e.getMessage());
        }

        final ArrayList<ParameterConstraint<Number>> deltaCons = new ArrayList<ParameterConstraint<Number>>();
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

        // big value
        pcaParameters.addParameter(PCAFilteredRunner.BIG_ID, 50);
        // small value
        pcaParameters.addParameter(PCAFilteredRunner.SMALL_ID, 1);
        Class<PCAFilteredRunner<V>> cls = ClassGenericsUtil.uglyCastIntoSubclass(PCAFilteredRunner.class);
        pca = pcaParameters.tryInstantiate(cls);
        for(ParameterException e : pcaParameters.getErrors()) {
          LoggingUtil.warning("Error in internal parameterization: " + e.getMessage());
        }

        final ArrayList<ParameterConstraint<Number>> deltaCons = new ArrayList<ParameterConstraint<Number>>();
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

   */
  public ClusteringAlgorithm<Clustering<Model>> getPartitionAlgorithm(DistanceQuery<V, D> query) {
    ListParameterization reconfig = new ListParameterization(partitionAlgorithmParameters);
    ProxyDistanceFunction<V, D> dist = ProxyDistanceFunction.proxy(query);
    reconfig.addParameter(AbstractDistanceBasedAlgorithm.DISTANCE_FUNCTION_ID, dist);
    ClusteringAlgorithm<Clustering<Model>> instance = reconfig.tryInstantiate(partitionAlgorithm);
    reconfig.failOnErrors();
    return instance;
  }

  /**
 
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

    ListParameterization opticsconfig = new ListParameterization(opticsAlgorithmParameters);
    opticsconfig.addParameter(OPTICS.DISTANCE_FUNCTION_ID, ProxyDistanceFunction.proxy(dishDistanceQuery));

    Class<OPTICS<V, PreferenceVectorBasedCorrelationDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(OPTICS.class);
    OPTICS<V, PreferenceVectorBasedCorrelationDistance> optics = null;
    optics = opticsconfig.tryInstantiate(cls);
    ClusterOrderResult<PreferenceVectorBasedCorrelationDistance> opticsResult = optics.run(database, relation);

    if(logger.isVerbose()) {
      logger.verbose("*** Compute Clusters.");
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

    ListParameterization parameters = new ListParameterization();
    parameters.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, FirstNEigenPairFilter.class.getName());
    parameters.addParameter(FirstNEigenPairFilter.EIGENPAIR_FILTER_N, Integer.toString(dim - 1));
    DependencyDerivator<DoubleVector, DoubleDistance> derivator = null;
    Class<DependencyDerivator<DoubleVector, DoubleDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(DependencyDerivator.class);
    derivator = parameters.tryInstantiate(cls);

    CorrelationAnalysisSolution<DoubleVector> model = derivator.run(derivatorDB);

    Matrix weightMatrix = model.getSimilarityMatrix();
    DoubleVector centroid = new DoubleVector(model.getCentroid());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization.tryInstantiate()

      ListParameterization parameters = new ListParameterization();
      parameters.addParameter(PCAFilteredRunner.PCA_EIGENPAIR_FILTER, FirstNEigenPairFilter.class.getName());
      parameters.addParameter(FirstNEigenPairFilter.EIGENPAIR_FILTER_N, Integer.toString(dimensionality));
      DependencyDerivator<DoubleVector, DoubleDistance> derivator = null;
      Class<DependencyDerivator<DoubleVector, DoubleDistance>> cls = ClassGenericsUtil.uglyCastIntoSubclass(DependencyDerivator.class);
      derivator = parameters.tryInstantiate(cls);

      CorrelationAnalysisSolution<DoubleVector> model = derivator.run(derivatorDB);
      LinearEquationSystem les = model.getNormalizedLinearEquationSystem(null);
      return les;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.