public final class DatabaseUtil extends Object
Modifier | Constructor and Description |
---|---|
private |
DatabaseUtil()
Fake constructor: Do not instantiate!
|
Modifier and Type | Method and Description |
---|---|
static SortedSet<ClassLabel> |
getClassLabels(Database database)
Retrieves all class labels within the database.
|
static SortedSet<ClassLabel> |
getClassLabels(Relation<? extends ClassLabel> database)
Retrieves all class labels within the database.
|
static ArrayModifiableDBIDs |
getObjectsByLabelMatch(Database database,
Pattern name_pattern)
Find object by matching their labels.
|
static Relation<String> |
guessLabelRepresentation(Database database)
Guess a potentially label-like representation, preferring class labels.
|
static Relation<String> |
guessObjectLabelRepresentation(Database database)
Guess a potentially object label-like representation.
|
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<String> guessLabelRepresentation(Database database) throws NoSupportedDataTypeException
database
- NoSupportedDataTypeException
public static Relation<String> guessObjectLabelRepresentation(Database database) throws NoSupportedDataTypeException
database
- NoSupportedDataTypeException
public static SortedSet<ClassLabel> getClassLabels(Relation<? extends ClassLabel> database)
database
- the database to be scanned for class labelspublic static SortedSet<ClassLabel> getClassLabels(Database database)
database
- the database to be scanned for class labelspublic static ArrayModifiableDBIDs getObjectsByLabelMatch(Database database, 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 neighborsCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.