Skip to content

itszootime/emulatorization-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emulatorization-api

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).

Requirements

Usage as a libary

Getting started

  1. 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>
  2. 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

Examples

Create a LHS design

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());
  }
}

Usage as a web service

Build

  1. Clone the repository.
  2. Create et.yml in src/main/resources, as described above.
  3. Run mvn package to create a deployable WAR file.

Requests

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.

Examples

Request a design

{
  "type": "DesignRequest",
  "size": 50,
  "inputs": [
      {
          "identifier": "A",
          "range": {
              "max": 1,
              "min": 0
          }
      }
  ]
}

Further reading

Is available in my Ph.D. thesis, Uncertainty Analysis in the Model Web (Jones, 2014).

About

Java API for emulator design, training and validation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published