git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngine@52234 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
413871c96b
commit
8e7a03a02d
|
@ -0,0 +1,59 @@
|
|||
package org.gcube.dataanalysis.ecoengine.evaluation.bioclimate;
|
||||
|
||||
import org.gcube.dataanalysis.ecoengine.user.GeneratorT;
|
||||
import org.gcube.dataanalysis.ecoengine.user.ModelerT;
|
||||
|
||||
public class ExperimentForArticle {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String configPath = "./cfg/";
|
||||
|
||||
final String[] csquareTables = {
|
||||
"hcaf_d_2016_linear_01332632269756",
|
||||
"hcaf_d_2020_linear_11332632270082",
|
||||
"hcaf_d_2024_linear_21332632270343",
|
||||
"hcaf_d_2028_linear_31332632270608",
|
||||
"hcaf_d_2032_linear_41332632270847",
|
||||
"hcaf_d_2036_linear_51332632271080",
|
||||
"hcaf_d_2040_linear_61332632271334",
|
||||
"hcaf_d_2044_linear_71332632271560",
|
||||
"hcaf_d_2050"
|
||||
};
|
||||
final String [] envelopeOutputTable = {"hspen_2016","hspen_2020","hspen_2024","hspen_2028","hspen_2032","hspen_2036","hspen_2040","hspen_2044","hspen_2050"};
|
||||
|
||||
final String [] finalDistributionTable = { "hspec_2016", "hspec_2020", "hspec_2024", "hspec_2028", "hspec_2032", "hspec_2036", "hspec_2040", "hspec_2044", "hspec_2050"};
|
||||
|
||||
/*
|
||||
String [] csquareTable = {"hcaf_d","hcaf_d_2050"};
|
||||
String [] envelopeOutputTable = {"hspen_micro_0","hspen_micro_2050"};
|
||||
String [] finalDistributionTable = {"hspec_0","hspec_2050"};
|
||||
*/
|
||||
|
||||
String preprocessedTable = "maxminlat_hspen";
|
||||
String envelopeTable = "hspen";
|
||||
String occurrenceCells = "occurrenceCells";
|
||||
|
||||
String commonkeycolumn = "csquarecode";
|
||||
String probabilitycolumn = "probability";
|
||||
|
||||
int numberOfResources = 4;
|
||||
|
||||
String speciesCode = "Fis-10199";
|
||||
String userName = "gianpaolo.coro";
|
||||
String modelName = "HSPEN";
|
||||
String generatorName = "AQUAMAPS_SUITABLE";
|
||||
String qualityOperationName = "QUALITY_ANALYSIS";
|
||||
String discrepancyOperationName = "DISCREPANCY_ANALYSIS";
|
||||
String finalDistributionKeyColumn = "csquarecode";
|
||||
|
||||
for (int i =0;i<csquareTables.length;i++){
|
||||
// Train
|
||||
System.out.println("Generating-> "+ envelopeOutputTable[i]);
|
||||
ModelerT.train(ModelerT.getTrainingConfigHSPEN(modelName, envelopeOutputTable[i], occurrenceCells,envelopeTable,csquareTables[i],configPath));
|
||||
// Generate
|
||||
// GeneratorT.generate(GeneratorT.getGenerationConfig(numberOfResources, generatorName, envelopeOutputTable[i], preprocessedTable, speciesCode, userName, csquareTables[i], finalDistributionTable[i], configPath));
|
||||
}
|
||||
System.out.println("COMPUTATION FINISHED!");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package org.gcube.dataanalysis.ecoengine.evaluation.bioclimate;
|
||||
|
||||
import org.gcube.dataanalysis.ecoengine.user.GeneratorT;
|
||||
import org.gcube.dataanalysis.ecoengine.user.ModelerT;
|
||||
|
||||
public class ExperimentHSPECForArticle {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String configPath = "./cfg/";
|
||||
|
||||
final String[] csquareTables = {
|
||||
"hcaf_d",
|
||||
"hcaf_d_2016_linear_01332632269756",
|
||||
"hcaf_d_2020_linear_11332632270082",
|
||||
"hcaf_d_2024_linear_21332632270343",
|
||||
"hcaf_d_2028_linear_31332632270608",
|
||||
"hcaf_d_2032_linear_41332632270847",
|
||||
"hcaf_d_2036_linear_51332632271080",
|
||||
"hcaf_d_2040_linear_61332632271334",
|
||||
"hcaf_d_2044_linear_71332632271560",
|
||||
"hcaf_d_2050"
|
||||
};
|
||||
|
||||
final String [] envelopeOutputTable = {
|
||||
"hspen",
|
||||
"hspen_2016",
|
||||
"hspen_2020",
|
||||
"hspen_2024",
|
||||
"hspen_2028",
|
||||
"hspen_2032",
|
||||
"hspen_2036",
|
||||
"hspen_2040",
|
||||
"hspen_2044",
|
||||
"hspen_2050"
|
||||
};
|
||||
|
||||
final String [] finalDistributionTable = {
|
||||
"hspec_2012",
|
||||
"hspec_2016",
|
||||
"hspec_2020",
|
||||
"hspec_2024",
|
||||
"hspec_2028",
|
||||
"hspec_2032",
|
||||
"hspec_2036",
|
||||
"hspec_2040",
|
||||
"hspec_2044",
|
||||
"hspec_2050"
|
||||
};
|
||||
|
||||
/*
|
||||
String [] csquareTable = {"hcaf_d","hcaf_d_2050"};
|
||||
String [] envelopeOutputTable = {"hspen_micro_0","hspen_micro_2050"};
|
||||
String [] finalDistributionTable = {"hspec_0","hspec_2050"};
|
||||
*/
|
||||
|
||||
String preprocessedTable = "maxminlat_hspen";
|
||||
String envelopeTable = "hspen";
|
||||
String occurrenceCells = "occurrenceCells";
|
||||
|
||||
String commonkeycolumn = "csquarecode";
|
||||
String probabilitycolumn = "probability";
|
||||
|
||||
int numberOfResources = 4;
|
||||
|
||||
String speciesCode = "Fis-10199";
|
||||
String userName = "gianpaolo.coro";
|
||||
String modelName = "HSPEN";
|
||||
String generatorName = "AQUAMAPS_SUITABLE";
|
||||
String qualityOperationName = "QUALITY_ANALYSIS";
|
||||
String discrepancyOperationName = "DISCREPANCY_ANALYSIS";
|
||||
String finalDistributionKeyColumn = "csquarecode";
|
||||
|
||||
for (int i =0;i<csquareTables.length;i++){
|
||||
// Train
|
||||
System.out.println("Generating-> "+finalDistributionTable[i]);
|
||||
// Generate
|
||||
GeneratorT.generate(GeneratorT.getGenerationConfig(numberOfResources, generatorName, envelopeOutputTable[i], preprocessedTable, speciesCode, userName, csquareTables[i], finalDistributionTable[i], configPath));
|
||||
}
|
||||
System.out.println("COMPUTATION FINISHED!");
|
||||
}
|
||||
|
||||
}
|
|
@ -268,7 +268,7 @@ public class InterpolateTables {
|
|||
String databasePassword = "d4science2";
|
||||
InterpolateTables interp = new InterpolateTables(configPath, persistencePath, databaseUrl, databaseUser, databasePassword);
|
||||
|
||||
interp.interpolate("hcaf_d", "hcaf_d_2050", 10, INTERPOLATIONFUNCTIONS.PARABOLIC, 2012, 2050);
|
||||
interp.interpolate("hcaf_d", "hcaf_d_2050", 10, INTERPOLATIONFUNCTIONS.LINEAR, 2012, 2050);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -194,6 +194,7 @@ public class AquamapsEnvelopeAlgorithm {
|
|||
String IceQuery = String.format(dynamicSelectValues,IceField,species);
|
||||
String LanddistQuery = String.format(dynamicSelectValues,LanddistField,species);
|
||||
|
||||
System.out.println(TemperatureQuery);
|
||||
List<Object> tempvalues = DatabaseFactory.executeSQLQuery(TemperatureQuery, vreConnection);
|
||||
List<Object> salinityvalues = DatabaseFactory.executeSQLQuery(SalinityQuery, vreConnection);
|
||||
List<Object> primprodvalues = DatabaseFactory.executeSQLQuery(PrimProdQuery, vreConnection);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ModelerT implements Runnable {
|
|||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
config.setConfigPath(configPath);
|
||||
config.setPersistencePath("./");
|
||||
config.setNumberOfResources(2);
|
||||
config.setNumberOfResources(4);
|
||||
config.setModel("HSPEN");
|
||||
|
||||
config.setParam("OuputEnvelopeTable", outputTable);
|
||||
|
|
Loading…
Reference in New Issue