Package com.google.refine.clustering

Examples of com.google.refine.clustering.Clusterer


            long start = System.currentTimeMillis();
            Project project = getProject(request);
            Engine engine = getEngine(request, project);
            JSONObject clusterer_conf = getJsonParameter(request,"clusterer");

            Clusterer clusterer = null;
            String type = clusterer_conf.has("type") ? clusterer_conf.getString("type") : "binning";
           
            if ("knn".equals(type)) {
                clusterer = new kNNClusterer();
            } else  {
                clusterer = new BinningClusterer();
            }
               
            clusterer.initializeFromJSON(project, clusterer_conf);
           
            clusterer.computeClusters(engine);
           
            respondJSON(response, clusterer);
            logger.info("computed clusters [{},{}] in {}ms", new Object[] { type, clusterer_conf.getString("function"), Long.toString(System.currentTimeMillis() - start) });
        } catch (Exception e) {
            respondException(response, e);
View Full Code Here

TOP

Related Classes of com.google.refine.clustering.Clusterer

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.