Package weka.core.neighboursearch
Class PLSNNSearchWithIndices
- java.lang.Object
-
- weka.core.neighboursearch.NearestNeighbourSearch
-
- weka.core.neighboursearch.NewNNSearch
-
- weka.core.neighboursearch.TransformNNSearch
-
- weka.core.neighboursearch.PLSNNSearch
-
- weka.core.neighboursearch.PLSNNSearchWithIndices
-
- All Implemented Interfaces:
Serializable,weka.core.AdditionalMeasureProducer,NearestNeighbourSearchWithIndices,weka.core.OptionHandler,weka.core.RevisionHandler
public class PLSNNSearchWithIndices extends PLSNNSearch implements NearestNeighbourSearchWithIndices
PLSNNSearch 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.PLSNNSearch
m_plsfilter, m_Preprocessing, mNumComponents
-
Fields inherited from class weka.core.neighboursearch.TransformNNSearch
m_myInstances
-
Fields inherited from class weka.core.neighboursearch.NewNNSearch
m_Distances, m_neighbours, m_SkipIdentical
-
-
Constructor Summary
Constructors Constructor Description PLSNNSearchWithIndices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRevision()Returns the revision string.StringglobalInfo()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.PLSNNSearch
addInstanceInfo, buildFilter, getNumComponents, getOptions, getPreprocessing, kNearestNeighbours, listOptions, setInstances, setNumComponents, setOptions, setPreprocessing, transformInstance, transformInstances, update
-
Methods inherited from class weka.core.neighboursearch.TransformNNSearch
getTransformedInstances
-
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:
globalInfoin 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 ExceptionReturns the indices of the k nearest instances in the current neighbourhood to the supplied instance.- Specified by:
kNearestNeighboursIndicesin 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:
getRevisionin interfaceweka.core.RevisionHandler- Overrides:
getRevisionin classNewNNSearch- Returns:
- the revision
-
-