messif.pivotselection
Class OutlierPivotChooser

java.lang.Object
  extended by messif.pivotselection.AbstractPivotChooser
      extended by messif.pivotselection.OutlierPivotChooser
All Implemented Interfaces:
java.io.Serializable, BucketFilter, BucketFilterAfterAdd, BucketFilterAfterRemove

public class OutlierPivotChooser
extends AbstractPivotChooser
implements java.io.Serializable, BucketFilterAfterAdd, BucketFilterAfterRemove

Selects pivots as outliers from the sample set. The procedure is as follows: - the first pivot is the object farthest from the other objects. - the second pivots is the farthest object from the first pivot. - the third pivots is the object farthest from the previous two pivots (having sum of distances to previous pivots maximal). - etc... Based on: L. Mico, J. Oncina, and E. Vidal. A new version of the nearest-neighbor approximating and eliminating search (AESA) with linear preprocessing-time and memory requirements. Pattern Recognition Letters, 15:9{17, 1994.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class messif.pivotselection.AbstractPivotChooser
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
 
Constructor Summary
OutlierPivotChooser()
          Creates a new instance of OutlierPivotChooser.
 
Method Summary
 void filterAfterAdd(LocalAbstractObject object, LocalBucket bucket)
          Filter object after its insertion into a bucket.
 void filterAfterRemove(LocalAbstractObject object, LocalBucket bucket)
          Filter object after its removal from a bucket.
protected  void selectPivot(int count, AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
          This method carries out the actual pivot selection and must be implemented by subclasses.
 
Methods inherited from class messif.pivotselection.AbstractPivotChooser
addPivot, clear, deregisterSampleProvider, getLastPivot, getNextPivot, getPivot, getPivot, iterator, registerSampleProvider, removeLastPivot, selectPivot, selectPivot, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutlierPivotChooser

public OutlierPivotChooser()
Creates a new instance of OutlierPivotChooser.

Method Detail

selectPivot

protected void selectPivot(int count,
                           AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
Description copied from class: AbstractPivotChooser
This method carries out the actual pivot selection and must be implemented by subclasses. The implementation must select at least count pitvots and add them by addPivot method.

Specified by:
selectPivot in class AbstractPivotChooser
Parameters:
count - Number of pivots to generate
sampleSetIterator - Iterator over the sample set of objects to choose new pivots from

filterAfterAdd

public void filterAfterAdd(LocalAbstractObject object,
                           LocalBucket bucket)
Description copied from interface: BucketFilterAfterAdd
Filter object after its insertion into a bucket.

Specified by:
filterAfterAdd in interface BucketFilterAfterAdd
Parameters:
object - the inserted object
bucket - bucket, where the object is stored

filterAfterRemove

public void filterAfterRemove(LocalAbstractObject object,
                              LocalBucket bucket)
Description copied from interface: BucketFilterAfterRemove
Filter object after its removal from a bucket.

Specified by:
filterAfterRemove in interface BucketFilterAfterRemove
Parameters:
object - the removed object
bucket - bucket, where the object has been stored