From 57ecc647f3da7eedbe329e3c770be2b9bd721a9f Mon Sep 17 00:00:00 2001 From: Gianpaolo Coro Date: Fri, 17 Jan 2014 13:13:57 +0000 Subject: [PATCH] test for clustering evaluation git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngine@90183 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../ecoengine/test/checks/TestClusterer.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/dataanalysis/ecoengine/test/checks/TestClusterer.java b/src/main/java/org/gcube/dataanalysis/ecoengine/test/checks/TestClusterer.java index adb9802..82f133a 100644 --- a/src/main/java/org/gcube/dataanalysis/ecoengine/test/checks/TestClusterer.java +++ b/src/main/java/org/gcube/dataanalysis/ecoengine/test/checks/TestClusterer.java @@ -19,7 +19,7 @@ public class TestClusterer { public static void main(String[] args) throws Exception { System.out.println("TEST 1"); - List clus = ClusterersFactory.getClusterers(testConfigLocal2()); + List clus = ClusterersFactory.getClusterers(testConfigLocalSpeciesl()); clus .get(0).init(); cluster(clus .get(0)); clus = null; @@ -86,6 +86,30 @@ public class TestClusterer { } + private static AlgorithmConfiguration testConfigLocalSpeciesl() { + + AlgorithmConfiguration config = new AlgorithmConfiguration(); + config.setConfigPath("./cfg/"); + config.setPersistencePath("./"); + config.setParam("OccurrencePointsTable","commonspraw"); + config.setParam("FeaturesColumnNames","f1#f2#f3#f4#f5#f6"); + config.setParam("OccurrencePointsClusterTable","commonsprawclustered"); + config.setParam("epsilon","3"); + config.setParam("min_points","5"); + + config.setConfigPath("./cfg/"); + config.setPersistencePath("./"); + config.setNumberOfResources(1); + config.setAgent("DBSCAN"); + + config.setParam("DatabaseUserName","gcube"); + config.setParam("DatabasePassword","d4science2"); + config.setParam("DatabaseURL","jdbc:postgresql://localhost/testdb"); + config.setParam("DatabaseDriver","org.postgresql.Driver"); + + return config; + } + private static AlgorithmConfiguration testConfigLocal2() { AlgorithmConfiguration config = new AlgorithmConfiguration();