ML Schema

Methods in the ML API with JSON-like inputs use the ML schema.

Schemas are used to validate JSON-style API inputs. You can use them as an additional guide for composing those inputs.

This page discusses:

Evaluate Schema

{
  "$id": "http://www.3ds.com/schemas/evalApprox.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Evaluate Approximations",
  "type": "object",
  "info": {
    "description": "JSON schema for evaluating approximations for a point, set of points, or sweep against a baseline.",
    "version": "1.0",
    "title": "Eval Approx Options"
  },
  "additionalProperties": false,
  "properties": {
    "approxIds": {
      "description": "A list of approx IDs to be evaluated",
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "modelIds": {
      "description": "A list of model IDs to be evaluated",
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "approxPoint": {
      "$ref": "#/definitions/point"
    },
    "approxPoints": {
      "$ref": "#/definitions/arrayOfPoints"
    },
    "modelPoint": {
      "$ref": "#/definitions/point"
    },
    "modelPoints": {
      "$ref": "#/definitions/arrayOfPoints"
    },
    "baselinePoint": {
      "$ref": "#/definitions/point"
    },
    "sweepValues": {
      "$ref": "#/definitions/arrayOfValues"
    }
  },
  "oneOf": [
    {
      "required": [
        "approxIds",
        "approxPoint"
      ]
    },
    {
      "required": [
        "approxIds",
        "approxPoints"
      ]
    },
    {
      "required": [
        "modelIds",
        "modelPoint"
      ]
    },
    {
      "required": [
        "modelIds",
        "modelPoints"
      ]
    },
    {
      "required": [
        "approxIds",
        "baselinePoint",
        "sweepValues"
      ]
    },
    {
      "required": [
        "modelIds",
        "baselinePoint",
        "sweepValues"
      ]
    }
  ],
  "definitions": {
    "approxIds":{
      "description": "A list of approx IDs to be evaluated",
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "modelIds":{
      "description": "A list of ML Model IDs to be evaluated",
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "point": {
      "description": "An object mapping ID strings to values",
      "type": "object",
      "patternProperties": {
        "[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}": {
          "$ref": "#/definitions/parameter"
        }
      },
      "minProperties": 1
    },
    "arrayOfPoints": {
      "description": "An array of points",
      "type": "array",
      "items": {
        "$ref": "#/definitions/point"
      }
    },
    "arrayOfValues": {
      "description": "An object mapping ID strings to vectors of numbers",
      "type": "object",
      "patternProperties": {
        ".*": {
          "type": "array",
            "items":{"type":"number"}
        }
      },
       "minProperties":1
    },
    "parameter": {
      "description": "A value for a parameter",
      "type": "number"
    }
  }
}

Kriging Schema

{
    "$id": "http://www.3ds.com/schemas/krigingSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Kriging",
    "type": "object",
    "info": {
        "description": "JSON schema Kriging options.",
        "version": "1.0",
        "title": "Kriging Options"
    },
    "additionalProperties": false,
    "properties": {
        "filterdist": {
            "type": "number",
            "default": 0.0005,
            "title": "Minimum distance between points",
            "description": "Minimum distance between points"
        },
        "corrfun": {
            "type": "string",
            "enum": ["gaussian","exponential","cspline","mlinear","mcubic"],
            "title":"Correlation function",
            "description": "Correlation function",
            "default": "gaussian"
        },
        "alpha": {
            "type": "number",
            "default": 1.0E-8,
            "title": "Alpha",
            "description": "Alpha"
        },
        "scalfun": {
            "type": "string",
            "enum": ["mean_0_standardization","min_max_normalization"],
            "title":"Input Parameter Scaling",
            "description": "Input Parameter Scaling",
            "default": "mean_0_standardization"
        },
        "optim": {
            "type": "string",
            "enum": ["mle","setaside"],
            "title":"Optimize On",
            "description": "Optimize On",
            "default": "mle"
        },
        "maxPoints": {
            "type": "integer",
            "title":"Maximum alternatives sampled",
            "description": "Maximum alternatives sampled",
            "default": 2000
        }, 
        "seed": {
            "type": "integer",
            "title":"Random Number Generator Seed",
            "description": "Random Number Generator Seed",
            "default": 1,
            "minValue": 1
        }   
    }
}

LVGP Schema

{
    "$id": "http://www.3ds.com/schemas/LVGPRSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "LVGPR",
    "type": "object",
    "info": {
        "description": "JSON schema Latent-Variable Gaussian Process Regression (LVGPR) options.",
        "version": "1.0",
        "title": "LVGPR Options"
    },
    "additionalProperties": false,
    "properties": {
        "random_state": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "title": "Random Seed",
            "description": "The seed of the pseudo random number generator used during training."
        },
        "corr_kernel": {
            "type": "string",
            "enum": ["RBFKernel", "Matern32Kernel","Matern52Kernel"],
            "title":"Correlation Kernel",
            "description": "Type of correlation kernel for quantitative input variables.",
            "default": "RBFKernel"
        },
        "lb_noise": {
            "type": "number",
            "title":"Minimum Noise Variance",
            "description": "Lower bound on the noise variance. Setting a higher value results in more stable computations when optimizing noise variance, but might reduce prediction quality.",
            "minimum": 0.0000000001,
            "maximum": 0.0001,
            "default": 0.00000001
        },
        "num_restarts": {
            "type": "integer",
            "title":"Noise Tuning Retries",
            "description": "The number of times to restart the local optimization from a new starting point at the initial noise variance. Subsequent optimizations steps are initialized from from the (distinct) optima at the previous step.",
            "minimum": 1,
            "default": 9
        }
    }
}

RBF Schema

{
    "$id": "http://www.3ds.com/schemas/rbfSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "RBF",
    "type": "object",
    "info": {
        "description": "JSON schema Radial Basis Function (RBF) options.",
        "version": "1.0",
        "title": "RBF Options"
    },
    "additionalProperties": false,
    "properties": {
        "smoothingFilter": {
            "type": "number",
            "minimum": 0,
            "maximum": 0.1,
            "default": 0,
            "title": "SmoothingFilter",
            "description": "The filter that is appled to noisy data."
        },
        "maxPoints": {
            "type": "integer",
            "title":"Maximum alternatives sampled",
            "description": "Maximum alternatives sampled",
            "minimum": 1,
            "maximum": 10000,
            "default": 2000
        }
    }
}

RSM Schema

{
    "$id": "https://www.3ds.com/schemas/rsmSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "RSM",
    "type": "object",
    "info": {
        "description": "JSON schema Response Surface Methodolgy (RSM) options.",
        "version": "1.0",
        "title": "RSM Options"
    },
    "additionalProperties": false,
    "properties": {
        "polyOrder": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 4,
            "title": "Polynomial Order",
            "description": "The order of the polynomial that will be used to fit the model."
        },
        "enableTermSelection": {
            "type": "boolean",
            "title": "Enable Term Selection",
            "description": "When enabled, this will use the F-ratios to add and remove terms in order to fit a compact model",

            "default": true
        },
        "enablekrig":{
        	"type": "boolean",
            "title": "Enable Kriging",
            "description" : "Is kriging enabled",
            "default": false
        },
        "cutoffTerms": {
            "type": "integer",
            "title":"?",
            "description": "?",
            "default": 0
        },
        "FtoAdd": {
            "type": "number",
            "title":"F-ratio to Add Term",
            "description": "The Fratio above which the corresponding term will be added to the model",
            "default": 4
        },
        "FtoDrop": {
            "type": "number",
            "title":"F-ratio to Drop Term",
            "description": "The Fratio below which the corresponding term will be removed to the model",
            "default": 4
        },
        "maxPoints": {
            "type": "integer",
            "title":"Maximum alternatives sampled",
            "description": "Maximum alternatives sampled",
            "default": 2000
        },
        "scalfun": {
            "type": "string",
            "enum": ["min_max_normalization"],
            "title":"?",
            "description": "?",
            "default": "min_max_normalization"
        }
    }
}

K-Folds Validation Schema

{
    "$id": "http://www.3ds.com/schemas/kfoldsSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "K-Folds",
    "type": "object",
    "info": {
        "description": "JSON schema for K-Folds Validation options.",
        "version": "1.0",
        "title": "K-Folds Options"
    },
    "additionalProperties": false,
    "properties": {
    	"kfolds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 10,
            "title": "Number of Folds",
            "description": "Number of Folds"
        },
        "randseed": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "title": "Random seed for validation",
            "description": "Random seed for validation"
        }
    }
}

Leave-One-Out Validation Schema

{
    "$id": "http://www.3ds.com/schemas/looSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Leave-One-Out Validation Schema",
    "type": "object",
    "info": {
        "description": "JSON schema for Leave-One-Out Validation options.",
        "version": "1.0",
        "title": "Leave-One-Out Options"
    },
    "additionalProperties": false,
    "properties": {
    	"loosize": {
            "type": "integer",
            "minimum": 1,
            "default": 20,
            "title": "Validation Set Size",
            "description": "Validation Set Size"
        },
        "randseed": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "title": "Random seed for validation",
            "description": "Random seed for validation"
        },
        "valunit": {
            "type": "string",
            "enum": ["perc","points"],
            "default": "perc",
            "title": "Unit for Validation Set Size",
            "description": "Unit for Validation Set Size"
        }
    }
}

Set Aside Validation Schema

{
    "$id": "http://www.3ds.com/schemas/setasideSchema.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Set Aside Validation Schema",
    "type": "object",
    "info": {
        "description": "JSON schema for Set Aside Validation options.",
        "version": "1.0",
        "title": "Set Aside Options"
    },
    "additionalProperties": false,
    "properties": {
    	"setasidesize": {
            "type": "integer",
            "minimum": 1,
            "default": 20,
            "title": "Set Aside Set Size",
            "description": "Set Aside Set Size"
        },
        "randseed": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "title": "Random seed for validation",
            "description": "Random seed for validation"
        },
        "valunit": {
            "type": "string",
            "enum": ["perc","points"],
            "default": "perc",
            "title": "Unit for Validation Set Size",
            "description": "Unit for Validation Set Size"
        }
    }
}