Package weka.core.neighboursearch
Class PCANNSearchWithIndices
- java.lang.Object
-
- weka.core.neighboursearch.NearestNeighbourSearch
-
- weka.core.neighboursearch.NewNNSearch
-
- weka.core.neighboursearch.PCANNSearch
-
- weka.core.neighboursearch.PCANNSearchWithIndices
-
- All Implemented Interfaces:
Serializable
,weka.core.AdditionalMeasureProducer
,NearestNeighbourSearchWithIndices
,weka.core.OptionHandler
,weka.core.RevisionHandler
public class PCANNSearchWithIndices extends PCANNSearch implements NearestNeighbourSearchWithIndices
PCANNSearch with index support.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class weka.core.neighboursearch.NewNNSearch
NewNNSearch.InstanceNode
-
Nested classes/interfaces inherited from class weka.core.neighboursearch.NearestNeighbourSearch
weka.core.neighboursearch.NearestNeighbourSearch.MyHeap, weka.core.neighboursearch.NearestNeighbourSearch.MyHeapElement, weka.core.neighboursearch.NearestNeighbourSearch.NeighborList, weka.core.neighboursearch.NearestNeighbourSearch.NeighborNode
-
-
Field Summary
-
Fields inherited from class weka.core.neighboursearch.PCANNSearch
m_CoverVariance, m_MaxAttrsInName, m_myInstances, m_pca, m_Preprocessing
-
Fields inherited from class weka.core.neighboursearch.NewNNSearch
m_Distances, m_neighbours, m_SkipIdentical
-
-
Constructor Summary
Constructors Constructor Description PCANNSearchWithIndices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getRevision()
Returns the revision string.String
globalInfo()
Returns a string describing this nearest neighbour search algorithm.int[]
kNearestNeighboursIndices(weka.core.Instance target, int kNN)
Returns the indices of the k nearest instances in the current neighbourhood to the supplied instance.-
Methods inherited from class weka.core.neighboursearch.PCANNSearch
addInstanceInfo, buildFilter, getMaximumAttributeNames, getOptions, getVarianceCovered, kNearestNeighbours, listOptions, setInstances, setMaximumAttributeNames, setOptions, setPreprocessing, setVarianceCovered, transformInstance, transformInstances, update
-
Methods inherited from class weka.core.neighboursearch.NewNNSearch
getDistances, getSkipIdentical, nearestNeighbour, setSkipIdentical, skipIdenticalTipText
-
Methods inherited from class weka.core.neighboursearch.NearestNeighbourSearch
combSort11, distanceFunctionTipText, enumerateMeasures, getDistanceFunction, getInstances, getMeasure, getMeasurePerformance, getPerformanceStats, measurePerformanceTipText, partition, quickSort, setDistanceFunction, setMeasurePerformance
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing this nearest neighbour search algorithm.- Overrides:
globalInfo
in classNewNNSearch
- Returns:
- a description of the algorithm for displaying in the explorer/experimenter gui
-
kNearestNeighboursIndices
public int[] kNearestNeighboursIndices(weka.core.Instance target, int kNN) throws Exception
Returns the indices of the k nearest instances in the current neighbourhood to the supplied instance.- Specified by:
kNearestNeighboursIndices
in interfaceNearestNeighbourSearchWithIndices
- Parameters:
target
- The instance to find the k nearest neighbours for.kNN
- The number of nearest neighbours to find.- Returns:
- the indices of the k nearest neighbors in the dataset
- Throws:
Exception
- if the neighbours could not be found.
-
getRevision
public String getRevision()
Returns the revision string.- Specified by:
getRevision
in interfaceweka.core.RevisionHandler
- Overrides:
getRevision
in classNewNNSearch
- Returns:
- the revision
-
-