public final class DatabaseUtil
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
DatabaseUtil()
Fake constructor: Do not instantiate!
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.SortedSet<ClassLabel> |
getClassLabels(Database database)
Retrieves all class labels within the database.
|
static java.util.SortedSet<ClassLabel> |
getClassLabels(Relation<? extends ClassLabel> database)
Retrieves all class labels within the database.
|
static ArrayModifiableDBIDs |
getObjectsByLabelMatch(Database database,
java.util.regex.Pattern name_pattern)
Find object by matching their labels.
|
static Relation<java.lang.String> |
guessLabelRepresentation(Database database)
Guess a potentially label-like representation, preferring class labels.
|
static Relation<java.lang.String> |
guessObjectLabelRepresentation(Database database)
Guess a potentially object label-like representation.
|
static <O> DistanceQuery<O> |
precomputedDistanceQuery(Database database,
Relation<O> relation,
DistanceFunction<? super O> distf,
Logging log)
Get (or create) a precomputed distance query for the database.
|
static <O> KNNQuery<O> |
precomputedKNNQuery(Database database,
Relation<O> relation,
DistanceFunction<? super O> distf,
int k)
Get (or create) a precomputed kNN query for the database.
|
static <O> KNNQuery<O> |
precomputedKNNQuery(Database database,
Relation<O> relation,
DistanceQuery<O> dq,
int k)
Get (or create) a precomputed kNN query for the database.
|
public static Relation<java.lang.String> guessLabelRepresentation(Database database) throws NoSupportedDataTypeException
database - NoSupportedDataTypeExceptionpublic static Relation<java.lang.String> guessObjectLabelRepresentation(Database database) throws NoSupportedDataTypeException
database - NoSupportedDataTypeExceptionpublic static java.util.SortedSet<ClassLabel> getClassLabels(Relation<? extends ClassLabel> database)
database - the database to be scanned for class labelspublic static java.util.SortedSet<ClassLabel> getClassLabels(Database database)
database - the database to be scanned for class labelspublic static ArrayModifiableDBIDs getObjectsByLabelMatch(Database database, java.util.regex.Pattern name_pattern)
database - Database to search inname_pattern - Name to match against class or object labelpublic static <O> KNNQuery<O> precomputedKNNQuery(Database database, Relation<O> relation, DistanceQuery<O> dq, int k)
database - Databaserelation - Relationdq - Distance queryk - required number of neighborspublic static <O> KNNQuery<O> precomputedKNNQuery(Database database, Relation<O> relation, DistanceFunction<? super O> distf, int k)
database - Databaserelation - Relationdistf - Distance functionk - required number of neighborspublic static <O> DistanceQuery<O> precomputedDistanceQuery(Database database, Relation<O> relation, DistanceFunction<? super O> distf, Logging log)
database - Databaserelation - Relationdistf - Distance functionlog - LoggerCopyright © 2019 ELKI Development Team. License information.