Train model (Anomaly)

Train model (Anomaly)

post

Take the output from a DSP block and train an anomaly detection model using K-means or GMM. Updates are streamed over the websocket API.

Authorizations
Path parameters
projectIdintegerRequired

Project ID

learnIdintegerRequired

Learn Block ID, use the impulse functions to retrieve the ID

Body
axesinteger[]Required

Which axes (indexes from DSP script) to include in the training set

Example: [0,11,22]
clusterCountintegerOptional

Number of clusters for K-means, or number of components for GMM

Example: 32
minimumConfidenceRatingnumberRequired

DEPRECATED, use "thresholds" instead. Minimum confidence rating required before tagging as anomaly

Example: 0.3
skipEmbeddingsAndMemorybooleanOptional

If set, skips creating embeddings and measuring memory (used in tests)

Responses
200
OK
application/json
Responseall of
post
POST /v1/api/{projectId}/jobs/train/anomaly/{learnId} HTTP/1.1
Host: studio.edgeimpulse.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 345

{
  "axes": [
    0,
    11,
    22
  ],
  "clusterCount": 32,
  "minimumConfidenceRating": 0.3,
  "skipEmbeddingsAndMemory": true,
  "thresholds": [
    {
      "key": "min_score",
      "description": "Score threshold",
      "helpText": "Threshold score for bounding boxes. If the score for a bounding box is below this the box will be discarded.",
      "suggestedValue": 1,
      "suggestedValueText": "text",
      "value": 0.5
    }
  ]
}
200

OK

{
  "success": true,
  "error": "text",
  "id": 12873488112
}

Last updated

Was this helpful?