cc.mallet.cluster.iterator
Class PairSampleIterator
java.lang.Object
cc.mallet.cluster.iterator.NeighborIterator
cc.mallet.cluster.iterator.PairSampleIterator
- All Implemented Interfaces:
- java.util.Iterator<Instance>
- Direct Known Subclasses:
- ClusterSampleIterator
public class PairSampleIterator
- extends NeighborIterator
Sample pairs of Instances.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- "Aron Culotta"
- See Also:
NeighborIterator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instances
protected InstanceList instances
random
protected Randoms random
positiveProportion
protected double positiveProportion
numberSamples
protected int numberSamples
positiveTarget
protected int positiveTarget
positiveCount
protected int positiveCount
totalCount
protected int totalCount
nonsingletonClusters
protected int[] nonsingletonClusters
PairSampleIterator
public PairSampleIterator(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.
hasNext
public boolean hasNext()
next
public Instance next()