## org.apache.mahout.math.random
Class IndianBuffet<T>

    java.lang.Object
      org.apache.mahout.math.random.IndianBuffet<T>

All Implemented Interfaces:
  Sampler<List<T>>

    public final class IndianBuffet<T>

extends Object
implements Sampler<List<T>>

Samples a "document" from an IndianBuffet process. See http://mlg.eng.cam.ac.uk/zoubin/talks/turin09.pdf for details

Nested Class Summary
`static class` `IndianBuffet.IdentityConverter` Just converts to an integer.
`static class` `IndianBuffet.ImpossibleException`
`static class` `IndianBuffet.StringConverter` Converts to a string.
`static class` `IndianBuffet.WordConverter` Converts to one of a list of common English words for reasonably small integers and converts to a token like w_92463 for big integers.

Constructor Summary
`IndianBuffet(double alpha, org.apache.mahout.math.random.IndianBuffet.WordFunction<T> converter)`

Method Summary
`static IndianBuffet<Integer>` `createIntegerDocumentSampler(double alpha)`
`static IndianBuffet<String>` `createTextDocumentSampler(double alpha)`
`List<T>` `sample()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndianBuffet

    public IndianBuffet(double alpha,
                        org.apache.mahout.math.random.IndianBuffet.WordFunction<T> converter)

Method Detail

### createIntegerDocumentSampler

    public static IndianBuffet<Integer> createIntegerDocumentSampler(double alpha)

### createTextDocumentSampler

    public static IndianBuffet<String> createTextDocumentSampler(double alpha)

### sample

    public List<T> sample()

  Specified by:
    `sample` in interface `Sampler<List<T>>`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.