std1.0.0-beta-7 SafeC docs

std :: ml::rl

Struct std::Bandit

#include <std/ml/rl.h> source

struct Bandit {
    &FloatTensor means;
    unsigned long k;
    struct Rng rng;
}

Fields

[k], drawn from N(0, 1)

§unsigned long ksource
§struct Rng rngsource

Methods

§float pull(unsigned long arm)source · definition

N(means[arm], 1)

§unsigned long best_arm() constsource · definition
§void drop()source · definition
§void free() consumesource · definition

= drop()

§static struct Bandit new(unsigned long k, unsigned long seed)source · definition