Docs Navigation +

Evaluation and feedback

The inference endpoint returns an evaluation ID that can be used later to get details on the evaluation and provide feedback.

GET https://api.fuzzy.ai/evaluation/<evaluation id>

This retrieves the details of an evaluation.

Request

The body of the request is empty.

Response

The response is UTF-8-encoded JSON representing evaluation log. It has the following properties.

PropertyPurposeExample

reqID

Unique ID of the evaluation; an opaque string

\n"546b6df3-5ed4-48ce-8d06-efa1fb7fcf22"

userID

Unique ID of the user; an opaque string

\n"vb5RR1H2c0"

agentID

Unique ID of the agent; an opaque string

\n"MM1134viO8"

agentID

Unique ID of the agent version; an opaque string

\n"Z3c3l7awq"

input

Object mapping input names to values

{
  "temperature": 18.9,
  "pressure": 177
}

fuzzified

Degrees of membership of each input value in the fuzzy sets defined for that input.

{
  "temperature": {
  "cool": 0.4,
  "warm": 0.5
  },
    "pressure": {
    "moderate": 0.8
    "high": 0.1
  }
}

rules

Array of strings representing rules that contributed to the output.

[
  "IF temperature IS cool THEN fanSpeed IS moderate",
  "IF temperature IS warm THEN fanSpeed IS moderateFast",
  "IF pressure IS moderate THEN fanSpeed IS slow",
  "IF pressure IS high THEN fanSpeed IS verySlow"
]

inferred

Object representing fuzzy membership values of output variables

{
  "fanSpeed": {
  "moderate": 0.4,
  "moderateFast": 0.5,
  "slow": 0.8
  "verySlow": 0.1
  }
}

clipped

Fuzzy sets shapes clipped to the degree of membership of the output values

  {
  "fanSpeed": {
    "verySlow": [[0, 0], [12, 0.1], [14, 0.1], [20, 0]]
    "slow": [[6, 0], [20, 0.8], [30, 0.8], [40, 0]]
    "moderate": [[35, 0], [50, 0.4], [60, 0.4], [70, 0]]
    "moderateFast": [[60, 0], [80, 0.5], [100, 0.5], [120, 0]]
  }
}

combined

Minimal combined polygons combining all the polygons in 'clipped'

{
  "fanSpeed": [
    [0, 0],
    [8, 0.43],
    [20, 0.8],
    [30, 0.8],
    [38, 0.2],
    [50, 0.4],
    [60, 0.4],
    [68, 0.2],
    [8, 0.5],
    [100, 0.5],
    [120, 0]]
  ]
}

centroid

Centroid of the polygons in 'combined'

{
  "fanSpeed": [50, 0.33]
}

crisp

Eventual defuzzified output

{
  "fanSpeed": 50
}

createdAt

Timestamp for evaluation

"2015-05-31T00:14:01Z"
 POST https://api.fuzzy.ai/evaluation/<evaluationid>/feedback 

This creates feedback for a particular evaluation. This is the main mechanism for optimizing a fuzzy agent.

Each feedback post can included multiple scores showing the success (or failure) of the evaluation. The names and scales of these scores is up to you. The scales are also independent of each other.

Request

The body of the request is UTF-8-encoded JSON representing the feedback.

PropertyPurposeExample

data

Object mapping success metric names to values

{
  "airFlow": 116,
  "ambientTemperature": 20
}

Response

The response is UTF-8-encoded JSON representing the feedback. It has the following properties.

PropertyPurposeExample

id

Unique ID for the feedback; an opaque string

"0292368a-0b27-11e5-8964-c8f73398600c"

evaluationLog

Unique ID for the evaluation; an opaque string

"1cc72b46-0b27-11e5-8964-c8f73398600c"

data

Object mapping success metric names to values

{
  "airFlow": 116,
  "ambientTemperature": 20
}

createdAt

Timestamp for the feedback

"2015-06-01T08:31:06Z"
GET https://api.fuzzy.ai/evaluation/<evaluationid>/feedback

This shows all feedback for a particular evaluation.

Request

The body of the request is empty.

Response

The response is UTF-8-encoded JSON representing the feedback. It is an array of feedback objects as described in the&nbps;POST /evaluation/<evaluation id>/feedback endpoint documentation.