git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngine@59235 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3618d810ea
commit
0251334f20
|
@ -50,7 +50,7 @@ public class HabitatRepresentativeness extends DataAnalysis {
|
||||||
templatesOccurrences.add(TableTemplates.TESTSET);
|
templatesOccurrences.add(TableTemplates.TESTSET);
|
||||||
|
|
||||||
InputTable p1 = new InputTable(templates,"ProjectingAreaTable","A Table containing projecting area information");
|
InputTable p1 = new InputTable(templates,"ProjectingAreaTable","A Table containing projecting area information");
|
||||||
PrimitiveType p2 = new PrimitiveType(String.class.getName(), null, PrimitiveTypes.STRING, "ProjectingAreaFeaturesOptionalCondition","optional filter for taking area rows","oceanarea>0",true);
|
PrimitiveType p2 = new PrimitiveType(String.class.getName(), null, PrimitiveTypes.STRING, "OptionalCondition","optional filter for taking area rows","where oceanarea>0",true);
|
||||||
InputTable p3 = new InputTable(templates,"PositiveCasesTable","A Table containing positive cases");
|
InputTable p3 = new InputTable(templates,"PositiveCasesTable","A Table containing positive cases");
|
||||||
InputTable p4 = new InputTable(templates,"NegativeCasesTable","A Table containing negative cases");
|
InputTable p4 = new InputTable(templates,"NegativeCasesTable","A Table containing negative cases");
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ public class HabitatRepresentativeness extends DataAnalysis {
|
||||||
try {
|
try {
|
||||||
status = 0;
|
status = 0;
|
||||||
String projectingAreaTable = config.getParam("ProjectingAreaTable");
|
String projectingAreaTable = config.getParam("ProjectingAreaTable");
|
||||||
String projectingAreaFeaturesOptionalCondition = config.getParam("ProjectingAreaFeaturesOptionalCondition");
|
String projectingAreaFeaturesOptionalCondition = config.getParam("OptionalCondition");
|
||||||
String FeaturesColumns = config.getParam("FeaturesColumns").replace(AlgorithmConfiguration.getListSeparator(), ",");
|
String FeaturesColumns = config.getParam("FeaturesColumns").replace(AlgorithmConfiguration.getListSeparator(), ",");
|
||||||
String positiveCasesTable = config.getParam("PositiveCasesTable");
|
String positiveCasesTable = config.getParam("PositiveCasesTable");
|
||||||
String negativeCasesTable = config.getParam("NegativeCasesTable");
|
String negativeCasesTable = config.getParam("NegativeCasesTable");
|
||||||
|
@ -273,7 +273,7 @@ public class HabitatRepresentativeness extends DataAnalysis {
|
||||||
config.setParam("ProjectingAreaTable", "hcaf_d");
|
config.setParam("ProjectingAreaTable", "hcaf_d");
|
||||||
// config.setParam("ProjectingAreaTable", "absence_data_baskingshark_random");
|
// config.setParam("ProjectingAreaTable", "absence_data_baskingshark_random");
|
||||||
// config.setParam("ProjectingAreaTable", "absence_data_baskingshark2");
|
// config.setParam("ProjectingAreaTable", "absence_data_baskingshark2");
|
||||||
config.setParam("ProjectingAreaFeaturesOptionalCondition", "where oceanarea>0");
|
config.setParam("OptionalCondition", "where oceanarea>0");
|
||||||
config.setParam("FeaturesColumns", "depthmean,depthmax,depthmin, sstanmean,sbtanmean,salinitymean,salinitybmean, primprodmean,iceconann,landdist,oceanarea");
|
config.setParam("FeaturesColumns", "depthmean,depthmax,depthmin, sstanmean,sbtanmean,salinitymean,salinitybmean, primprodmean,iceconann,landdist,oceanarea");
|
||||||
config.setParam("PositiveCasesTable", "presence_data_baskingshark");
|
config.setParam("PositiveCasesTable", "presence_data_baskingshark");
|
||||||
config.setParam("NegativeCasesTable", "absence_data_baskingshark_random");
|
config.setParam("NegativeCasesTable", "absence_data_baskingshark_random");
|
||||||
|
|
|
@ -4,7 +4,9 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||||
|
import org.gcube.dataanalysis.ecoengine.datatypes.InputTable;
|
||||||
import org.gcube.dataanalysis.ecoengine.datatypes.PrimitiveType;
|
import org.gcube.dataanalysis.ecoengine.datatypes.PrimitiveType;
|
||||||
|
import org.gcube.dataanalysis.ecoengine.datatypes.enumtypes.PrimitiveTypes;
|
||||||
import org.gcube.dataanalysis.ecoengine.evaluation.DiscrepancyAnalysis;
|
import org.gcube.dataanalysis.ecoengine.evaluation.DiscrepancyAnalysis;
|
||||||
import org.gcube.dataanalysis.ecoengine.evaluation.bioclimate.InterpolateTables.INTERPOLATIONFUNCTIONS;
|
import org.gcube.dataanalysis.ecoengine.evaluation.bioclimate.InterpolateTables.INTERPOLATIONFUNCTIONS;
|
||||||
import org.gcube.dataanalysis.ecoengine.interfaces.Evaluator;
|
import org.gcube.dataanalysis.ecoengine.interfaces.Evaluator;
|
||||||
|
@ -53,7 +55,7 @@ public static void main(String[] args) throws Exception {
|
||||||
trans = null;
|
trans = null;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
trans = EvaluatorsFactory.getEvaluators(testConfigLocal7());
|
trans = EvaluatorsFactory.getEvaluators(testConfigLocal11());
|
||||||
trans.get(0).init();
|
trans.get(0).init();
|
||||||
Regressor.process(trans.get(0));
|
Regressor.process(trans.get(0));
|
||||||
|
|
||||||
|
@ -173,26 +175,27 @@ public static void main(String[] args) throws Exception {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static AlgorithmConfiguration testConfigLocal11() {
|
||||||
private static AlgorithmConfiguration testConfigLocal8() {
|
|
||||||
|
|
||||||
AlgorithmConfiguration config = Regressor.getConfig();
|
AlgorithmConfiguration config = Regressor.getConfig();
|
||||||
config.setAgent("OCCURRENCES_INTERSECTOR");
|
|
||||||
|
|
||||||
config.setParam("longitudeColumn", "decimallongitude");
|
config.setNumberOfResources(1);
|
||||||
config.setParam("latitudeColumn", "decimallatitude");
|
config.setAgent("HRS");
|
||||||
config.setParam("recordedByColumn", "recordedby");
|
|
||||||
config.setParam("scientificNameColumn", "scientificname");
|
|
||||||
config.setParam("eventDateColumn", "eventdate");
|
|
||||||
config.setParam("lastModificationColumn", "modified");
|
|
||||||
config.setParam("rightTableName", "occurrencetestduplicates2");
|
|
||||||
config.setParam("leftTableName", "occurrencetestduplicates");
|
|
||||||
config.setParam("finalTableName", "occurrencesintersected");
|
|
||||||
config.setParam("spatialTolerance", "0.5");
|
|
||||||
config.setParam("confidence", "80");
|
|
||||||
|
|
||||||
|
config.setParam("ProjectingAreaTable","hspen_filteredid_16d7291d_7b11_48f3_af3a_1b2eef38efee");
|
||||||
|
config.setParam("OptionalCondition","oceanarea>0");
|
||||||
|
config.setParam("PositiveCasesTable","presence_hcafid_317683c4_3474_4648_ba5b_9cd832db73cf");
|
||||||
|
config.setParam("NegativeCasesTable","absence_hcafid_c4bb5bae_b875_4753_974b_c4b3ad616a24");
|
||||||
|
config.setParam("FeaturesColumns", "depthmean"+AlgorithmConfiguration.getListSeparator()+"depthmax"+AlgorithmConfiguration.getListSeparator()+"depthmin"+AlgorithmConfiguration.getListSeparator()+" sstanmean"+AlgorithmConfiguration.getListSeparator()+"sbtanmean"+AlgorithmConfiguration.getListSeparator()+"salinitymean"+AlgorithmConfiguration.getListSeparator()+"salinitybmean"+AlgorithmConfiguration.getListSeparator()+" primprodmean"+AlgorithmConfiguration.getListSeparator()+"iceconann"+AlgorithmConfiguration.getListSeparator()+"landdist"+AlgorithmConfiguration.getListSeparator()+"oceanarea");
|
||||||
|
|
||||||
|
config.setParam("DatabaseUserName","utente");
|
||||||
|
config.setParam("DatabasePassword","d4science");
|
||||||
|
config.setParam("DatabaseURL","jdbc:postgresql://dbtest.next.research-infrastructures.eu/testdb");
|
||||||
|
config.setParam("DatabaseDriver","org.postgresql.Driver");
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,19 +44,19 @@ public class HcafFilter extends QueryExecutor {
|
||||||
public List<StatisticalType> getInputParameters() {
|
public List<StatisticalType> getInputParameters() {
|
||||||
|
|
||||||
PrimitiveType p0 = new PrimitiveType(String.class.getName(), null, PrimitiveTypes.STRING, finalTableLabel$,"the name of the Filtered Hcaf", "hcaf_filtered");
|
PrimitiveType p0 = new PrimitiveType(String.class.getName(), null, PrimitiveTypes.STRING, finalTableLabel$,"the name of the Filtered Hcaf", "hcaf_filtered");
|
||||||
ServiceType p1 = new ServiceType(ServiceParameters.RANDOMSTRING, finalTable, "the name of the Filtered Hcaf", "hspen_filtered");
|
ServiceType p1 = new ServiceType(ServiceParameters.RANDOMSTRING, finalTable, "the name of the Filtered Hcaf", "hcaf_filtered");
|
||||||
PrimitiveType p2 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bbx1, "the left lower longitude of the bounding box (range [-180,+180])", "0");
|
|
||||||
PrimitiveType p3 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bbx2, "the right upper longitude of the bounding box (range [-180,+180])", "0");
|
|
||||||
PrimitiveType p4 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bby1, "the left lower latitude of the bounding box (range [-90,+90])", "10");
|
PrimitiveType p4 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bby1, "the left lower latitude of the bounding box (range [-90,+90])", "10");
|
||||||
|
PrimitiveType p2 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bbx1, "the left lower longitude of the bounding box (range [-180,+180])", "0");
|
||||||
PrimitiveType p5 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bby2, "the right upper latitude of the bounding box (range [-90,+90])", "10");
|
PrimitiveType p5 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bby2, "the right upper latitude of the bounding box (range [-90,+90])", "10");
|
||||||
|
PrimitiveType p3 = new PrimitiveType(Float.class.getName(), null, PrimitiveTypes.NUMBER, bbx2, "the right upper longitude of the bounding box (range [-180,+180])", "0");
|
||||||
|
|
||||||
List<StatisticalType> parameters = new ArrayList<StatisticalType>();
|
List<StatisticalType> parameters = new ArrayList<StatisticalType>();
|
||||||
parameters.add(p0);
|
parameters.add(p0);
|
||||||
parameters.add(p1);
|
parameters.add(p1);
|
||||||
parameters.add(p2);
|
|
||||||
parameters.add(p3);
|
|
||||||
parameters.add(p4);
|
parameters.add(p4);
|
||||||
|
parameters.add(p2);
|
||||||
parameters.add(p5);
|
parameters.add(p5);
|
||||||
|
parameters.add(p3);
|
||||||
|
|
||||||
DatabaseType.addDefaultDBPars(parameters);
|
DatabaseType.addDefaultDBPars(parameters);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue