Examples of weights()


Examples of org.apache.spark.mllib.classification.LogisticRegressionModel.weights()

    // LogisticRegressionModel model = lr.train(points.rdd());

    LogisticRegressionModel model = LogisticRegressionWithSGD.train(points.rdd(),
      iterations, stepSize);

    System.out.print("Final w: " + model.weights());

    sc.stop();
  }
}
View Full Code Here

Examples of redis.clients.jedis.ZParams.weights()

  jedis.zadd("foo", 2, "b");
  jedis.zadd("bar", 2, "a");
  jedis.zadd("bar", 2, "b");

  ZParams params = new ZParams();
  params.weights(2, 2.5);
  params.aggregate(ZParams.Aggregate.SUM);
  long result = jedis.zunionstore("dst", params, "foo", "bar");

  assertEquals(2, result);
View Full Code Here

Examples of redis.clients.jedis.ZParams.weights()

  jedis.zadd(bfoo, 2, bb);
  jedis.zadd(bbar, 2, ba);
  jedis.zadd(bbar, 2, bb);

  ZParams bparams = new ZParams();
  bparams.weights(2, 2.5);
  bparams.aggregate(ZParams.Aggregate.SUM);
  long bresult = jedis.zunionstore(SafeEncoder.encode("dst"), bparams,
    bfoo, bbar);

  assertEquals(2, bresult);
View Full Code Here

Examples of redis.clients.jedis.ZParams.weights()

  jedis.zadd("foo", 1, "a");
  jedis.zadd("foo", 2, "b");
  jedis.zadd("bar", 2, "a");

  ZParams params = new ZParams();
  params.weights(2, 2.5);
  params.aggregate(ZParams.Aggregate.SUM);
  long result = jedis.zinterstore("dst", params, "foo", "bar");

  assertEquals(1, result);
View Full Code Here

Examples of redis.clients.jedis.ZParams.weights()

  jedis.zadd(bfoo, 1, ba);
  jedis.zadd(bfoo, 2, bb);
  jedis.zadd(bbar, 2, ba);

  ZParams bparams = new ZParams();
  bparams.weights(2, 2.5);
  bparams.aggregate(ZParams.Aggregate.SUM);
  long bresult = jedis.zinterstore(SafeEncoder.encode("dst"), bparams,
    bfoo, bbar);

  assertEquals(1, bresult);
View Full Code Here

Examples of redis.clients.jedis.ZParams.weights()

        trans.zremrangeByScore(
            semname.getBytes(),
            "-inf".getBytes(),
            String.valueOf(now - timeout).getBytes());
        ZParams params = new ZParams();
        params.weights(1, 0);
        trans.zinterstore(czset, params, czset, semname);
        trans.incr(ctr);
        List<Object> results = trans.exec();
        int counter = ((Long)results.get(results.size() - 1)).intValue();
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.