NV
- Vector type@Title(value="Knn Query Based Local PCA Preprocessor") @Description(value="Materializes the local PCA and the locally weighted matrix of objects of a database. The PCA is based on k nearest neighbor queries.") public class KNNQueryFilteredPCAIndex<NV extends NumberVector<?>> extends AbstractFilteredPCAIndex<NV>
Modifier and Type | Class and Description |
---|---|
static class |
KNNQueryFilteredPCAIndex.Factory<V extends NumberVector<?>>
Factory class.
|
Modifier and Type | Field and Description |
---|---|
private int |
k
Query k.
|
private KNNQuery<NV,DoubleDistance> |
knnQuery
The kNN query instance we use.
|
private static Logging |
LOG
Logger.
|
pca
storage
relation
Constructor and Description |
---|
KNNQueryFilteredPCAIndex(Relation<NV> relation,
PCAFilteredRunner<NV> pca,
KNNQuery<NV,DoubleDistance> knnQuery,
int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Logging |
getLogger()
Get the classes static logger.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
void |
logStatistics()
Send statistics to the logger, if enabled.
|
protected KNNList<DoubleDistance> |
objectsForPCA(DBIDRef id)
Returns the objects to be considered within the PCA for the specified query
object.
|
getLocalProjection, initialize
private static final Logging LOG
private final KNNQuery<NV extends NumberVector<?>,DoubleDistance> knnQuery
private final int k
public KNNQueryFilteredPCAIndex(Relation<NV> relation, PCAFilteredRunner<NV> pca, KNNQuery<NV,DoubleDistance> knnQuery, int k)
relation
- Database to usepca
- PCA Runner to useknnQuery
- KNN Query to usek
- k valueprotected KNNList<DoubleDistance> objectsForPCA(DBIDRef id)
AbstractFilteredPCAIndex
objectsForPCA
in class AbstractFilteredPCAIndex<NV extends NumberVector<?>>
id
- the id of the query object for which a PCA should be performedpublic String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<NV extends NumberVector<?>>
public String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<NV extends NumberVector<?>>
public Logging getLogger()
AbstractPreprocessorIndex
getLogger
in class AbstractPreprocessorIndex<NV extends NumberVector<?>,PCAFilteredResult>
public void logStatistics()
Index