|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.database.connection.AbstractDatabaseConnection<O>
O - the type of DatabaseObject to be provided by the implementing
class as element of the supplied databasepublic abstract class AbstractDatabaseConnection<O extends DatabaseObject>
Abstract super class for all database connections. AbstractDatabaseConnection already provides the setting of the database according to parameters.
| Field Summary | |
|---|---|
static OptionID |
CLASS_LABEL_CLASS_ID
OptionID for CLASS_LABEL_CLASS_PARAM |
private ObjectParameter<ClassLabel> |
CLASS_LABEL_CLASS_PARAM
Parameter to specify the association of occurring class labels, must extend ClassLabel. |
static OptionID |
CLASS_LABEL_INDEX_ID
OptionID for CLASS_LABEL_INDEX_PARAM |
private IntParameter |
CLASS_LABEL_INDEX_PARAM
Optional parameter that specifies the index of the label to be used as class label, must be an integer equal to or greater than 0. |
private Class<? extends ClassLabel> |
classLabelClass
Holds the value of CLASS_LABEL_CLASS_PARAM. |
protected Integer |
classLabelIndex
Holds the value of CLASS_LABEL_INDEX_PARAM, null if no class label
is specified. |
(package private) Database<O> |
database
Holds the instance of the database specified by DATABASE_PARAM. |
static OptionID |
DATABASE_ID
OptionID for DATABASE_PARAM |
private ObjectParameter<Database<O>> |
DATABASE_PARAM
Parameter to specify the database to be provided by the parse method, must extend Database. |
static OptionID |
EXTERNAL_ID_INDEX_ID
OptionID for EXTERNAL_ID_INDEX_PARAM |
private IntParameter |
EXTERNAL_ID_INDEX_PARAM
Optional parameter that specifies the index of the label to be used as an external id, must be an integer equal to or greater than 0. |
private Integer |
externalIDIndex
Holds the value of EXTERNAL_ID_INDEX_PARAM. |
static String |
LABEL_CONCATENATION
A sign to separate components of a label. |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug, logger |
| Constructor Summary | |
|---|---|
protected |
AbstractDatabaseConnection(Parameterization config,
boolean forceExternalID)
Adds parameters DATABASE_PARAM, CLASS_LABEL_INDEX_PARAM,
CLASS_LABEL_CLASS_PARAM, and EXTERNAL_ID_INDEX_PARAM, to
the option handler additionally to parameters of super class. |
| Method Summary | |
|---|---|
protected List<Pair<O,Associations>> |
normalizeAndTransformLabels(List<Pair<O,List<String>>> objectAndLabelsList,
Normalization<O> normalization)
Normalizes and transforms the specified list of objects and their labels into a list of objects and their associations. |
private List<Pair<O,Associations>> |
transformLabels(List<Pair<O,List<String>>> objectAndLabelsList)
Transforms the specified list of objects and their labels into a list of objects and their associations. |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.database.connection.DatabaseConnection |
|---|
getDatabase |
| Field Detail |
|---|
public static final String LABEL_CONCATENATION
public static final OptionID DATABASE_ID
DATABASE_PARAM
private final ObjectParameter<Database<O extends DatabaseObject>> DATABASE_PARAM
Database.
Default value: SequentialDatabase
Key: -dbc.database
Database<O extends DatabaseObject> database
DATABASE_PARAM.
public static final OptionID CLASS_LABEL_INDEX_ID
CLASS_LABEL_INDEX_PARAM
private final IntParameter CLASS_LABEL_INDEX_PARAM
Key: -dbc.classLabelIndex
protected Integer classLabelIndex
CLASS_LABEL_INDEX_PARAM, null if no class label
is specified.
public static final OptionID CLASS_LABEL_CLASS_ID
CLASS_LABEL_CLASS_PARAM
private final ObjectParameter<ClassLabel> CLASS_LABEL_CLASS_PARAM
ClassLabel.
Default value: SimpleClassLabel
Key: -dbc.classLabelClass
private Class<? extends ClassLabel> classLabelClass
CLASS_LABEL_CLASS_PARAM.
public static final OptionID EXTERNAL_ID_INDEX_ID
EXTERNAL_ID_INDEX_PARAM
private final IntParameter EXTERNAL_ID_INDEX_PARAM
AssociationID.EXTERNAL_ID is set.
Key: -dbc.externalIDIndex
private Integer externalIDIndex
EXTERNAL_ID_INDEX_PARAM.
| Constructor Detail |
|---|
protected AbstractDatabaseConnection(Parameterization config,
boolean forceExternalID)
DATABASE_PARAM, CLASS_LABEL_INDEX_PARAM,
CLASS_LABEL_CLASS_PARAM, and EXTERNAL_ID_INDEX_PARAM, to
the option handler additionally to parameters of super class.
| Method Detail |
|---|
protected List<Pair<O,Associations>> normalizeAndTransformLabels(List<Pair<O,List<String>>> objectAndLabelsList,
Normalization<O> normalization)
throws NonNumericFeaturesException
objectAndLabelsList - the list of object and their labels to be
transformednormalization - the normalization to be applied
NonNumericFeaturesException - if any exception occurs during
normalizationprivate List<Pair<O,Associations>> transformLabels(List<Pair<O,List<String>>> objectAndLabelsList)
objectAndLabelsList - the list of object and their labels to be
transformed
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||