Package edu.cmu.graphchi.datablocks

Examples of edu.cmu.graphchi.datablocks.FloatConverter


    public void calc_validation_rmse(String baseFilename, int nShards){
      /* Run GraphChi */
      try{
        GraphChiEngine<Integer, Float> engine = new GraphChiEngine<Integer, Float>(baseFilename + "e", nShards);
        engine.setEdataConverter(new FloatConverter());
        engine.setEnableDeterministicExecution(false);
        engine.setVertexDataConverter(null)// We do not access vertex values.
        engine.setModifiesInedges(false); // Important optimization
        engine.setModifiesOutedges(false); // Important optimization
       
View Full Code Here


    public void run(String graphName, int numShards) throws Exception {
        this.graphName = graphName;
        engine = new GraphChiEngine<FloatPair, Float>(graphName, numShards);
        engine.setEnableScheduler(false);
        engine.setSkipZeroDegreeVertices(true);
        engine.setEdataConverter(new FloatConverter());
        engine.setVertexDataConverter(new FloatPairConverter());
        engine.setMaxWindow(20000000);
        engine.run(this, 8);
    }
View Full Code Here

        }, new EdgeProcessor<Float>() {
            @Override
            public Float receiveEdge(int from, int to, String token) {
                return Float.parseFloat(token);
            }
        }, new FloatPairConverter(), new FloatConverter());
    }
View Full Code Here

    public void run(String graphName, int numShards) throws Exception {
        this.graphName = graphName;
        engine = new GraphChiEngine<FloatPair, Float>(graphName, numShards);
        engine.setEnableScheduler(false);
        engine.setSkipZeroDegreeVertices(true);
        engine.setEdataConverter(new FloatConverter());
        engine.setVertexDataConverter(new FloatPairConverter());
        engine.setMaxWindow(20000000);
        engine.run(this, 8);
    }
View Full Code Here

            }
        }, new EdgeProcessor<Float>() {
            public Float receiveEdge(int from, int to, String token) {
                return Float.parseFloat(token);
            }
        }, new FloatPairConverter(), new FloatConverter());
    }
View Full Code Here

            }
        }, new EdgeProcessor<FloatPair>() {
            public FloatPair receiveEdge(int from, int to, String token) {
                return new FloatPair(Float.parseFloat(token), 0.f);
            }
        }, new FloatConverter(), new FloatPairConverter());
    }
View Full Code Here

        }

        /* Run GraphChi */
        GraphChiEngine<Float, FloatPair> engine = new GraphChiEngine<Float, FloatPair>(baseFilename, nShards);
        engine.setEdataConverter(new FloatPairConverter());
        engine.setVertexDataConverter(new FloatConverter());
        engine.setModifiesInedges(false); // Important optimization

        engine.run(new WeightedPagerank(), 4);

        logger.info("Ready.");
View Full Code Here

    protected static FastSharder createSharder(String graphName, int numShards) throws IOException {
        return new FastSharder<Integer, Float>(graphName, numShards, null, new EdgeProcessor<Float>() {
            public Float receiveEdge(int from, int to, String token) {
                return (token == null ? 0.0f : Float.parseFloat(token));
            }
        }, new IntConverter(), new FloatConverter());
    }
View Full Code Here

        ALSMatrixFactorization als = new ALSMatrixFactorization(D, baseFilename, nShards);
        logger.info("Set latent factor dimension to: " + als.D);

        /* Run GraphChi */
        GraphChiEngine<Integer, Float> engine = new GraphChiEngine<Integer, Float>(baseFilename, nShards);
        engine.setEdataConverter(new FloatConverter());
        engine.setEnableDeterministicExecution(false);
        engine.setVertexDataConverter(null)// We do not access vertex values.
        engine.setModifiesInedges(false); // Important optimization
        engine.setModifiesOutedges(false); // Important optimization

View Full Code Here

            }
        }, new EdgeProcessor<Float>() {
            public Float receiveEdge(int from, int to, String token) {
                return (token == null ? 0.0f : Float.parseFloat(token));
            }
        }, new FloatConverter(), new FloatConverter());
    }
View Full Code Here

TOP

Related Classes of edu.cmu.graphchi.datablocks.FloatConverter

Copyright © 2018 www.massapicom. 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.