public class ModelJsonReader
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MODEL_DETAILS_FILE |
| Constructor and Description |
|---|
ModelJsonReader() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
elementExists(com.google.gson.JsonElement jsonElement,
java.lang.String jsonPath) |
static void |
fillObject(java.lang.Object object,
com.google.gson.JsonElement from,
java.lang.String elementPath) |
static com.google.gson.JsonObject |
parseModelJson(MojoReaderBackend mojoReaderBackend) |
static Table |
readTable(com.google.gson.JsonObject modelJson,
java.lang.String tablePath)
Extracts a Table from H2O's model serialized into JSON.
|
public static final java.lang.String MODEL_DETAILS_FILE
public static com.google.gson.JsonObject parseModelJson(MojoReaderBackend mojoReaderBackend)
mojoReaderBackend - JsonObject representing the deserialized Json.public static Table readTable(com.google.gson.JsonObject modelJson, java.lang.String tablePath)
modelJson - Full JSON representation of a modeltablePath - Path in the given JSON to the desired table. Levels are dot-separated.Table, if there was a table found by following the given path. Otherwise null.public static void fillObject(java.lang.Object object,
com.google.gson.JsonElement from,
java.lang.String elementPath)
public static boolean elementExists(com.google.gson.JsonElement jsonElement,
java.lang.String jsonPath)
jsonElement - A (potentially complex) element to search injsonPath - Path in the given JSON to the desired table. Levels are dot-separated.
E.g. 'model._output.variable_importances'.