|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.neighboursearch.NearestNeighbourSearch
weka.core.neighboursearch.NewNNSearch
weka.core.neighboursearch.TransformNNSearch
weka.core.neighboursearch.PLSNNSearch
public class PLSNNSearch
Class implementing the brute force search algorithm for nearest neighbour search, filtered using PLS.
Valid options are:-S Skip identical instances (distances equal to zero).
| 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 | |
|---|---|
protected weka.filters.supervised.attribute.PLSFilter |
m_plsfilter
The neighbourhood of instances to find neighbours in. |
protected int |
m_Preprocessing
the type of preprocessing |
protected int |
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 |
| Fields inherited from class weka.core.neighboursearch.NearestNeighbourSearch |
|---|
m_DistanceFunction, m_Instances, m_kNN, m_MeasurePerformance, m_Stats |
| Constructor Summary | |
|---|---|
PLSNNSearch()
Constructor. |
|
PLSNNSearch(weka.core.Instances insts)
Constructor that uses the supplied set of instances. |
|
| Method Summary | |
|---|---|
void |
addInstanceInfo(weka.core.Instance ins)
Adds the given instance info. |
protected weka.filters.supervised.attribute.PLSFilter |
buildFilter(int numcomponents)
|
int |
getNumComponents()
|
String[] |
getOptions()
Gets the current settings. |
weka.core.SelectedTag |
getPreprocessing()
Gets the type of preprocessing to use |
weka.core.Instances |
kNearestNeighbours(weka.core.Instance target,
int kNN)
Returns k nearest instances in the current neighbourhood to the supplied instance. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
void |
setInstances(weka.core.Instances insts)
Sets the instances comprising the current neighbourhood. |
void |
setNumComponents(int nc)
|
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setPreprocessing(weka.core.SelectedTag value)
Sets the type of preprocessing to use |
weka.core.Instance |
transformInstance(weka.core.Instance in)
|
protected weka.core.Instances |
transformInstances(weka.core.Instances in)
|
void |
update(weka.core.Instance ins)
Updates the LinearNNSearch to cater for the new added instance. |
| Methods inherited from class weka.core.neighboursearch.TransformNNSearch |
|---|
getTransformedInstances |
| Methods inherited from class weka.core.neighboursearch.NewNNSearch |
|---|
getDistances, getRevision, getSkipIdentical, globalInfo, nearestNeighbour, setSkipIdentical, skipIdenticalTipText |
| Methods inherited from class weka.core.neighboursearch.NearestNeighbourSearch |
|---|
combSort11, distanceFunctionTipText, enumerateMeasures, getDistanceFunction, getInstances, getMeasure, getMeasurePerformance, getPerformanceStats, measurePerformanceTipText, partition, quickSort, setDistanceFunction, setMeasurePerformance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected weka.filters.supervised.attribute.PLSFilter m_plsfilter
protected int mNumComponents
protected int m_Preprocessing
| Constructor Detail |
|---|
public PLSNNSearch()
public PLSNNSearch(weka.core.Instances insts)
insts - the instances to use| Method Detail |
|---|
public void setNumComponents(int nc)
public int getNumComponents()
protected weka.core.Instances transformInstances(weka.core.Instances in)
throws Exception
Exception
public weka.core.Instance transformInstance(weka.core.Instance in)
throws Exception
transformInstance in class TransformNNSearchExceptionprotected weka.filters.supervised.attribute.PLSFilter buildFilter(int numcomponents)
public weka.core.Instances kNearestNeighbours(weka.core.Instance target,
int kNN)
throws Exception
kNearestNeighbours in class NewNNSearchtarget - The instance to find the k nearest neighbours for.kNN - The number of nearest neighbours to find.
Exception - if the neighbours could not be found.
public void setInstances(weka.core.Instances insts)
throws Exception
setInstances in class NewNNSearchinsts - The set of instances on which the nearest neighbour
search is carried out. Usually this set is the
training set.
Exception - if setting of instances fails
public void update(weka.core.Instance ins)
throws Exception
update in class NewNNSearchins - The instance to add. Usually this is the instance that
is added to our neighbourhood i.e. the training
instances.
Exception - if the given instances are nullpublic void addInstanceInfo(weka.core.Instance ins)
addInstanceInfo in class NewNNSearchins - The instance to add the information of. Usually this is
the test instance supplied to update the range of
attributes in the distance function.public Enumeration listOptions()
NewNNSearch
listOptions in interface weka.core.OptionHandlerlistOptions in class NewNNSearchpublic void setPreprocessing(weka.core.SelectedTag value)
value - the preprocessing type
public void setOptions(String[] options)
throws Exception
NewNNSearch-S Skip identical instances (distances equal to zero).
setOptions in interface weka.core.OptionHandlersetOptions in class NewNNSearchoptions - the list of options as an array of strings
Exception - if an option is not supportedpublic weka.core.SelectedTag getPreprocessing()
public String[] getOptions()
NewNNSearch
getOptions in interface weka.core.OptionHandlergetOptions in class NewNNSearch
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||