Interface CovarianceMatrixBuilder

    • Method Detail

      • processRelation

        default double[][] processRelation​(Relation<? extends NumberVector> relation)
        Compute covariance matrix for a complete relation.
        Parameters:
        relation - the relation to run on
        Returns:
        covariance matrix
      • processIds

        double[][] processIds​(DBIDs ids,
                              Relation<? extends NumberVector> database)
        Compute covariance matrix for a collection of database IDs.
        Parameters:
        ids - a collection of ids
        database - the database used
        Returns:
        covariance matrix
      • processQueryResults

        default double[][] processQueryResults​(DoubleDBIDList results,
                                               Relation<? extends NumberVector> database,
                                               int k)
        Compute covariance matrix for a QueryResult collection.

        By default it will just run processIds, but subclasses may use the distances for weighting.

        Parameters:
        results - a collection of QueryResults
        database - the database used
        k - the number of entries to process
        Returns:
        covariance matrix
      • processQueryResults

        default double[][] processQueryResults​(DoubleDBIDList results,
                                               Relation<? extends NumberVector> database)
        Compute covariance matrix for a QueryResult Collection.

        By default it will just collect the ids and run processIds, but subclasses may use the distance for weighting.

        Parameters:
        results - a collection of QueryResults
        database - the database used
        Returns:
        covariance matrix