This commit is contained in:
Gianpaolo Coro 2012-12-03 12:07:14 +00:00
parent e3797794a0
commit d7264b4f39
4 changed files with 40 additions and 3 deletions

View File

@ -0,0 +1,11 @@
ANOMALIES_DETECTION=DBSCAN,KMEANS,XMEANS
CLASSIFICATION=FEED_FORWARD_A_N_N_DISTRIBUTION
CLIMATE=BIOCLIMATE_HSPEC,BIOCLIMATE_HCAF,BIOCLIMATE_HSPEN
CORRELATION_ANALYSIS=HRS
DATA_CLUSTERING=DBSCAN,KMEANS,XMEANS
FILTERING=HCAF_FILTER,HSPEN_FILTER
FUNCTION_SIMULATION=FEED_FORWARD_A_N_N_DISTRIBUTION
OCCURRENCES=ABSENCE_CELLS_FROM_AQUAMAPS,PRESENCE_CELLS_GENERATION,OCCURRENCES_MERGER,OCCURRENCES_INTERSECTOR,OCCURRENCES_MARINE_TERRESTRIAL,OCCURRENCES_DUPLICATES_DELETER,OCCURRENCES_SUBTRACTION
PERFORMANCES_EVALUATION=QUALITY_ANALYSIS,DISCREPANCY_ANALYSIS
SPECIES_SIMULATION=AQUAMAPS_SUITABLE,AQUAMAPS_NATIVE,AQUAMAPS_NATIVE_2050,AQUAMAPS_SUITABLE_2050,AQUAMAPS_NATIVE_NEURALNETWORK,AQUAMAPS_SUITABLE_NEURALNETWORK
TRAINING=HSPEN,AQUAMAPSNN,FEED_FORWARD_ANN

View File

@ -45,6 +45,7 @@ public class AlgorithmConfiguration extends LexicalEngineConfiguration implement
public static String evaluatorsFile = "evaluators.properties";
public static String clusterersFile = "clusterers.properties";
public static String transducererFile = "transducerers.properties";
public static String userperspectiveFile = "userperspective.properties";
public static String RapidMinerOperatorsFile = "operators.xml";
public static String StatisticalManagerService = "StatisticalManager";
public static String StatisticalManagerClass = "Services";

View File

@ -1,8 +1,12 @@
package org.gcube.dataanalysis.ecoengine.processing.factories;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Properties;
@ -162,6 +166,24 @@ public class ProcessorsFactory {
return map;
}
public static HashMap<String,List<String>> getAllFeaturesUser(String configPath) throws Exception{
BufferedReader br = new BufferedReader(new FileReader(new File(configPath,AlgorithmConfiguration.userperspectiveFile)));
LinkedHashMap<String,List<String>> map = new LinkedHashMap<String, List<String>>();
String line = br.readLine();
while (line!=null){
int eq = line.indexOf("=");
String key = line.substring(0,eq);
String values = line.substring(eq+1);
String [] algoNames = values.split(",");
List<String> list = Arrays.asList(algoNames);
map.put(key, list);
line = br.readLine();
}
br.close();
return map;
}
//adds a generator to a sorted generators list
public static void addAgent2List(List<ComputationalAgent> agents, ComputationalAgent agent){
if (agent == null)

View File

@ -2,14 +2,12 @@ package org.gcube.dataanalysis.ecoengine.test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
import org.gcube.dataanalysis.ecoengine.interfaces.Clusterer;
import org.gcube.dataanalysis.ecoengine.interfaces.ComputationalAgent;
import org.gcube.dataanalysis.ecoengine.interfaces.Evaluator;
import org.gcube.dataanalysis.ecoengine.interfaces.Generator;
import org.gcube.dataanalysis.ecoengine.interfaces.Transducerer;
import org.gcube.dataanalysis.ecoengine.processing.factories.ClusterersFactory;
import org.gcube.dataanalysis.ecoengine.processing.factories.EvaluatorsFactory;
import org.gcube.dataanalysis.ecoengine.processing.factories.GeneratorsFactory;
@ -99,6 +97,11 @@ public static void main(String[] args) throws Exception {
String desc = ClusterersFactory.getDescription("./cfg/","DBSCAN");
System.out.println("DESCRIPTION: "+desc);
System.out.println("\n***TEST 20- Get USER perspective***");
Map m = ProcessorsFactory.getAllFeaturesUser("./cfg/");
System.out.println("USER PERSPECTIVE: "+m);
int cores = Runtime.getRuntime().availableProcessors();
System.out.println("Number of cores: "+cores);
}