Examples of BetaBayesFactory


Examples of com.mapr.stats.bandit.BetaBayesFactory

        if (args.length > 2) {
            totalItems = Integer.parseInt(args[2]);
        }

        BanditFactory bf = new BetaBayesFactory();
        if (args.length > 3) {
            if (args[3].startsWith("beta")) {
                bf = new BetaBayesFactory();
            } else if (args[3].startsWith("gamma")) {
                bf = new GammaNormalBayesFactory();
            } else {
                throw new IllegalArgumentException("Wanted beta or gamma to specify distribution");
            }
        }

        List<BayesianBandit> bandit = Lists.newArrayList();
        for (int m = 0; m < 50; m++) {
            bandit.add(bf.createBandit(totalItems, gen));
        }

        double[] prob = new double[totalItems];
        Uniform u = new Uniform(gen);
        for (int j = 0; j < totalItems; j++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.