Package de.lmu.ifi.dbs.elki.database

Examples of de.lmu.ifi.dbs.elki.database.ProxyDatabase


        // Make a Noise cluster
        result.addCluster(new Cluster<Model>(pair.getValue(), true, ClusterModel.CLUSTER));
      }
      else {
        DBIDs partids = pair.getValue();
        ProxyDatabase proxy = new ProxyDatabase(partids, relation);
       
        ClusteringAlgorithm<Clustering<Model>> partitionAlgorithm = getPartitionAlgorithm(query);
        if(logger.isVerbose()) {
          logger.verbose("Running " + partitionAlgorithm.getClass().getName() + " on partition [corrDim = " + pair.getKey() + "]...");
        }
View Full Code Here


   *         the specified subspace
   * @throws UnableToComplyException if an error according to the database
   *         occurs
   */
  private MaterializedRelation<ParameterizationFunction> buildDB(int dim, Matrix basis, DBIDs ids, Relation<ParameterizationFunction> relation) throws UnableToComplyException {
    ProxyDatabase proxy = new ProxyDatabase(ids);
    VectorFieldTypeInformation<ParameterizationFunction> type = VectorFieldTypeInformation.get(ParameterizationFunction.class, basis.getColumnDimensionality());
    MaterializedRelation<ParameterizationFunction> prep = new MaterializedRelation<ParameterizationFunction>(proxy, type, ids);
    proxy.addRelation(prep);
   
    // Project
    for(DBID id : ids) {
      ParameterizationFunction f = project(basis, relation.get(id));
      prep.set(id, f);
View Full Code Here

   * @throws UnableToComplyException if an error according to the database
   *         occurs
   */
  private Database buildDerivatorDB(Relation<ParameterizationFunction> relation, CASHInterval interval) throws UnableToComplyException {
    DBIDs ids = interval.getIDs();
    ProxyDatabase proxy = new ProxyDatabase(ids);
    int dim = relation.get(ids.iterator().next()).getDimensionality();
    SimpleTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<DoubleVector>(DoubleVector.class, dim, new DoubleVector(new double[dim]));
    MaterializedRelation<DoubleVector> prep = new MaterializedRelation<DoubleVector>(proxy, type, ids);
    proxy.addRelation(prep);

    // Project
    for(DBID id : ids) {
      DoubleVector v = new DoubleVector(relation.get(id).getColumnVector().getArrayRef());
      prep.set(id, v);
View Full Code Here

   *         interval
   * @throws UnableToComplyException if initialization of the database is not
   *         possible
   */
  private Database buildDerivatorDB(Relation<ParameterizationFunction> relation, DBIDs ids) throws UnableToComplyException {
    ProxyDatabase proxy = new ProxyDatabase(ids);
    int dim = relation.get(ids.iterator().next()).getDimensionality();
    SimpleTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<DoubleVector>(DoubleVector.class, dim, new DoubleVector(new double[dim]));
    MaterializedRelation<DoubleVector> prep = new MaterializedRelation<DoubleVector>(proxy, type, ids);
    proxy.addRelation(prep);

    // Project
    for(DBID id : ids) {
      DoubleVector v = new DoubleVector(relation.get(id).getColumnVector().getArrayRef());
      prep.set(id, v);
View Full Code Here

   */
  private List<Cluster<Model>> runDBSCAN(Relation<V> relation, DBIDs ids, Subspace<V> subspace) {
    // distance function
    distanceFunction.setSelectedDimensions(subspace.getDimensions());

    ProxyDatabase proxy;
    if(ids == null) {
      // TODO: in this case, we might want to use an index - the proxy below
      // will prevent this!
      ids = relation.getDBIDs();
    }

    proxy = new ProxyDatabase(ids, relation);

    DBSCAN<V, DoubleDistance> dbscan = new DBSCAN<V, DoubleDistance>(distanceFunction, epsilon, minpts);
    // run DBSCAN
    if(logger.isVerbose()) {
      logger.verbose("\nRun DBSCAN on subspace " + subspace.dimensonsToString());
View Full Code Here

   */
  private List<Cluster<Model>> runDBSCAN(Relation<V> relation, DBIDs ids, Subspace<V> subspace) {
    // distance function
    distanceFunction.setSelectedDimensions(subspace.getDimensions());

    ProxyDatabase proxy;
    if(ids == null) {
      // TODO: in this case, we might want to use an index - the proxy below
      // will prevent this!
      ids = relation.getDBIDs();
    }

    proxy = new ProxyDatabase(ids, relation);

    DBSCAN<V, DoubleDistance> dbscan = new DBSCAN<V, DoubleDistance>(distanceFunction, epsilon, minpts);
    // run DBSCAN
    if(logger.isVerbose()) {
      logger.verbose("\nRun DBSCAN on subspace " + subspace.dimensonsToString());
View Full Code Here

        // Make a Noise cluster
        result.addCluster(new Cluster<Model>(pair.getValue(), true, ClusterModel.CLUSTER));
      }
      else {
        DBIDs partids = pair.getValue();
        ProxyDatabase proxy = new ProxyDatabase(partids, relation);
       
        ClusteringAlgorithm<Clustering<Model>> partitionAlgorithm = getPartitionAlgorithm(query);
        if(logger.isVerbose()) {
          logger.verbose("Running " + partitionAlgorithm.getClass().getName() + " on partition [corrDim = " + pair.getKey() + "]...");
        }
View Full Code Here

   *         the specified subspace
   * @throws UnableToComplyException if an error according to the database
   *         occurs
   */
  private MaterializedRelation<ParameterizationFunction> buildDB(int dim, Matrix basis, DBIDs ids, Relation<ParameterizationFunction> relation) throws UnableToComplyException {
    ProxyDatabase proxy = new ProxyDatabase(ids);
    VectorFieldTypeInformation<ParameterizationFunction> type = VectorFieldTypeInformation.get(ParameterizationFunction.class, basis.getColumnDimensionality());
    MaterializedRelation<ParameterizationFunction> prep = new MaterializedRelation<ParameterizationFunction>(proxy, type, ids);
    proxy.addRelation(prep);
   
    // Project
    for(DBID id : ids) {
      ParameterizationFunction f = project(basis, relation.get(id));
      prep.set(id, f);
View Full Code Here

   * @throws UnableToComplyException if an error according to the database
   *         occurs
   */
  private Database buildDerivatorDB(Relation<ParameterizationFunction> relation, CASHInterval interval) throws UnableToComplyException {
    DBIDs ids = interval.getIDs();
    ProxyDatabase proxy = new ProxyDatabase(ids);
    int dim = relation.get(ids.iterator().next()).getDimensionality();
    SimpleTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<DoubleVector>(DoubleVector.class, dim, new DoubleVector(new double[dim]));
    MaterializedRelation<DoubleVector> prep = new MaterializedRelation<DoubleVector>(proxy, type, ids);
    proxy.addRelation(prep);

    // Project
    for(DBID id : ids) {
      DoubleVector v = new DoubleVector(relation.get(id).getColumnVector().getArrayRef());
      prep.set(id, v);
View Full Code Here

   *         interval
   * @throws UnableToComplyException if initialization of the database is not
   *         possible
   */
  private Database buildDerivatorDB(Relation<ParameterizationFunction> relation, DBIDs ids) throws UnableToComplyException {
    ProxyDatabase proxy = new ProxyDatabase(ids);
    int dim = relation.get(ids.iterator().next()).getDimensionality();
    SimpleTypeInformation<DoubleVector> type = new VectorFieldTypeInformation<DoubleVector>(DoubleVector.class, dim, new DoubleVector(new double[dim]));
    MaterializedRelation<DoubleVector> prep = new MaterializedRelation<DoubleVector>(proxy, type, ids);
    proxy.addRelation(prep);

    // Project
    for(DBID id : ids) {
      DoubleVector v = new DoubleVector(relation.get(id).getColumnVector().getArrayRef());
      prep.set(id, v);
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.database.ProxyDatabase

Copyright © 2018 www.massapicom. 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.