Package org.apache.mahout.math.jet.random

Examples of org.apache.mahout.math.jet.random.Exponential.nextDouble()


    for (Vector.Element element : beta) {
        int sign = 1;
        if (gen.nextDouble() < 0.5) {
          sign = -1;
        }
      element.set(sign * exp.nextDouble());
    }

    // train one copy of a wrapped learner
    AdaptiveLogisticRegression.Wrapper w = new AdaptiveLogisticRegression.Wrapper(2, 200, new L1());
    for (int i = 0; i < 3000; i++) {
View Full Code Here


        Date date = new Date();
        boolean compromised = false;
        while (t < end) {
            ObjectNode transaction = new ObjectNode(nodeFactory);
            t += interval.nextDouble();
            date.setTime((long) t);
            transaction.set("timestamp", new LongNode((long) (t / 1000)));
            transaction.set("date", new TextNode(df.format(date)));
            Integer merchantId = merchant.sample();
            transaction.set("merchant", new IntNode(merchantId));
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.