cc.mallet.cluster.iterator
Class NodeClusterSampleIterator

java.lang.Object
  extended by cc.mallet.cluster.iterator.NeighborIterator
      extended by cc.mallet.cluster.iterator.PairSampleIterator
          extended by cc.mallet.cluster.iterator.ClusterSampleIterator
              extended by cc.mallet.cluster.iterator.NodeClusterSampleIterator
All Implemented Interfaces:
java.util.Iterator<Instance>

public class NodeClusterSampleIterator
extends ClusterSampleIterator

Samples merges of a singleton cluster with another (possibly non-singleton) cluster.

Since:
1.0
Version:
1.0
Author:
"Aron Culotta"
See Also:
PairSampleIterator, NeighborIterator

Field Summary
 
Fields inherited from class cc.mallet.cluster.iterator.PairSampleIterator
instances, nonsingletonClusters, numberSamples, positiveCount, positiveProportion, positiveTarget, random, totalCount
 
Fields inherited from class cc.mallet.cluster.iterator.NeighborIterator
clustering
 
Constructor Summary
NodeClusterSampleIterator(Clustering clustering, Randoms random, double positiveProportion, int numberSamples)
           
 
Method Summary
 Instance next()
           
 
Methods inherited from class cc.mallet.cluster.iterator.ClusterSampleIterator
sampleFromArray, sampleSplitFromArray
 
Methods inherited from class cc.mallet.cluster.iterator.PairSampleIterator
hasNext
 
Methods inherited from class cc.mallet.cluster.iterator.NeighborIterator
getClustering, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeClusterSampleIterator

public NodeClusterSampleIterator(Clustering clustering,
                                 Randoms random,
                                 double positiveProportion,
                                 int numberSamples)
Parameters:
clustering - True clustering.
random - Source of randomness.
positiveProportion - Proportion of Instances that should be positive examples.
numberSamples - Total number of samples to generate.
Method Detail

next

public Instance next()
Specified by:
next in interface java.util.Iterator<Instance>
Overrides:
next in class ClusterSampleIterator