org.apache.mahout.math.stats
Class Sampler
java.lang.Object
org.apache.mahout.math.stats.Sampler
public class Sampler
- extends Object
Discrete distribution sampler:
Samples from a given discrete distribution: you provide a source of randomness and a Vector
(cardinality N) which describes a distribution over [0,N), and calls to sample() sample
from 0 to N using this distribution
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sampler
public Sampler(Random random)
Sampler
public Sampler(Random random,
double[] sampler)
Sampler
public Sampler(Random random,
Vector distribution)
sample
public int sample(Vector distribution)
sample
public int sample()
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.