Examples of MixMessage


Examples of hivemall.mix.MixMessage

        if(!initialized) {
            replaceGroupIDIfRequired();
            initialize(); // initialize connections to mix servers
        }

        MixMessage msg = new MixMessage(event, feature, weight, covar, clock, deltaUpdates);
        msg.setGroupID(groupID);

        NodeInfo server = router.selectNode(msg);
        Channel ch = channelMap.get(server);
        if(!ch.isActive()) {// reconnect
            SocketAddress remoteAddr = server.getSocketAddress();
View Full Code Here

Examples of hivemall.mix.MixMessage

        float weight = requestMsg.getWeight();
        float covar = requestMsg.getCovariance();
        short clock = requestMsg.getClock();
        int deltaUpdates = requestMsg.getDeltaUpdates();

        MixMessage responseMsg = null;
        try {
            partial.lock();

            int diffClock = partial.diffClock(clock);
            partial.add(weight, covar, clock, deltaUpdates);

            if(diffClock >= syncThreshold) {// sync model if clock DIFF is above threshold
                float averagedWeight = partial.getWeight();
                float minCovar = partial.getMinCovariance();
                short totalClock = partial.getClock();
                responseMsg = new MixMessage(event, feature, averagedWeight, minCovar, totalClock, 0 /* deltaUpdates */);
            }
        } finally {
            partial.unlock();
        }

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.