Java API for emulator design, training and validation. Can be used either as a library in an existing project, or as a web service (backend to the emulatorization-web project).
- MATLAB and gpmlab-2.0 code.
- A running matlab-connector instance.
- A running Rserve instance.
-
Add the dependency to your
pom.xml
:<dependencies> <!-- Other dependencies may be here too --> <dependency> <groupId>org.uncertweb</groupId> <artifactId>emulatorization-api</artifactId> <version>0.1-SNAPSHOT</version> </dependency> </dependencies>
If you have troubles resolving the dependency, add the UncertWeb Maven repository to your list of repositories:
<repositories> <!-- Other repositories may be here too --> <repository> <id>UncertWebMavenRepository</id> <name>UncertWeb Maven Repository</name> <url>http://giv-uw.uni-muenster.de/m2/repo</url> </repository> </repositories>
-
Create
et.yml
in your resource directory. The example below assumes you have the matlab-connector running locally on port 44444 and Rserve on port 55555:matlab: host: localhost port: 44444 # You can also substitute host, port for an HTTP proxy # proxy: http://somehost/someproxy gpml_path: /path/to/gpmlab-2.0 rserve: host: localhost port: 55555 webapp: url: http://localhost:8080/emulatorization-api
import org.uncertweb.et.design.LHSDesign;
public static void main(String[] args) {
List<Input> inputs = new ArrayList<Input>();
inputs.add(new VariableInput("A", 0.0, 1.0));
try {
Design design = LHSDesign.create(inputs, numSamples);
for (Double point : design.getPoints("A")) {
System.out.println(point);
}
}
catch (Exception e) {
System.err.println(e.getMessage());
}
}
- Clone the repository.
- Create
et.yml
insrc/main/resources
, as described above. - Run
mvn package
to create a deployable WAR file.
Type | Purpose |
---|---|
GetProcessIdentifiers | Retrieve a list of supported process identifiers from a web service. |
GetProcessDescription | Retrieve a description of a process on a web service. |
Screening | Perform input screening on a web service process. |
Design | Create a design for a set of inputs. |
EvaluateProcess | Evaluate a web service process against a design. |
TrainEmulator | Train an emulator using a design and process evaluation result. |
EvaluateEmulator | Evaluate an emulator against a design. |
Validation | Compare simulator and emulator evaluation results. |
QualityIndicators | Compute quality indicators from simulator and emulator evaluation results. |
{
"type": "DesignRequest",
"size": 50,
"inputs": [
{
"identifier": "A",
"range": {
"max": 1,
"min": 0
}
}
]
}
Is available in my Ph.D. thesis, Uncertainty Analysis in the Model Web (Jones, 2014).