Detecting Anomalies for Small Datasets
Learn how to detect anomalies in small datasets.
The Anomaly Detection service provides granular control over how you can improve the prediction of the model, by changing the sensitivity value they can either increase or decrease the number of anomalies in the response based on the model confidence. The anomaly score for a detected anomaly dictates the model confidence of an anomaly being a true positive. The higher the score, the greater the chances of it being a true positive and the converse.
The estimated and actual values of each of the identified anomalies are rendered in a graph. You can use this difference to learn the severity of the anomaly.
If multiple anomalies occurred from various signals at specific timestamp, then the anomaly scores that ranks those signals for the identified anomaly are specified. A graph of these anomalies over the particular time period displays so that you can easily understand if specific signals have high scores over time.
We recommend this approach when you want to detect anomalies and obtain results from trained anomaly detection models.
- Download and configure OCI CLI or SDK as described in existing OCI documentation.
-
Use a trained model by creating an
HTTP POST
request and make the request to the endpoint received in the previous step. - Parse the HTTP response to get the results for use in applications.
Example API Calls
Use the following Anomaly Detection commands and required parameters to help you to detect and obtain results:
-
Get the model:
https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/models/{ModelId} Method: GET Body:
-
Detect synchronously with data:
https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/actions/detectAnomalies Method: POST Body: { "modelId": "ocid1.aimodel.oc1.phx.amaaaaaaor7l3jialglh5vnt2w3nj6zly4dpcjfex6lktujo24t5aklmn2ta", "requestType": "INLINE", "signalNames":["sensor1", "sensor2", "sensor3", "sensor4", "sensor5", "sensor6", "sensor7", "sensor8", "sensor9", "sensor10", "sensor11"], "data":[ {"timestamp":"2023-01-17T20:44:46Z","values": [1,-9.6193,0.3208,0.6199,-0.4936,5.0697,-0.5063,0.4253,0.4864,-0.0798,0.0446]}, {"timestamp":"2023-01-17T20:45:46Z","values": [1,9.4101,-0.3522,0.0942,-0.0564,null,0.0263,-0.3787,-0.8164,-0.6446,0.5502]}, {"timestamp":"2023-01-17T20:46:46Z","values": [1,5.3969,-0.472,0.75,0.3282,6.5583,0.0238,-0.2817,-0.3909,0.8025,0.5054]}, {"timestamp":"2023-01-17T20:47:46Z","values": [1,0.2148,-0.516,-0.0296,0.2276,5.7661,0.5468,0.534,0.2702,-0.4179,0.0011]} ] }
We recommend this approach when you want to detect anomalies and obtain results from trained anomaly detection models.
- Download and configure OCI CLI or SDK as described in existing OCI documentation.
-
Use a trained model by creating an
HTTP POST
request and make the request to the endpoint received in the previous step. - Parse the HTTP response to get the results for use in applications.
Example API Calls
Use the DetectAnomalies operation to help you to detect and obtain results.
-
Get the model:
https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/models/{ModelId} Method: GET Body:
-
Detect synchronously with data:
https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/actions/detectAnomalies Method: POST Body: { "modelId": "ocid1.aimodel.oc1.phx.amaaaaaaor7l3jialglh5vnt2w3nj6zly4dpcjfex6lktujo24t5aklmn2ta", "requestType": "INLINE", "signalNames":["sensor1", "sensor2", "sensor3", "sensor4", "sensor5", "sensor6", "sensor7", "sensor8", "sensor9", "sensor10", "sensor11"], "data":[ {"timestamp":"2023-01-17T20:44:46Z","values": [1,-9.6193,0.3208,0.6199,-0.4936,5.0697,-0.5063,0.4253,0.4864,-0.0798,0.0446]}, {"timestamp":"2023-01-17T20:45:46Z","values": [1,9.4101,-0.3522,0.0942,-0.0564,null,0.0263,-0.3787,-0.8164,-0.6446,0.5502]}, {"timestamp":"2023-01-17T20:46:46Z","values": [1,5.3969,-0.472,0.75,0.3282,6.5583,0.0238,-0.2817,-0.3909,0.8025,0.5054]}, {"timestamp":"2023-01-17T20:47:46Z","values": [1,0.2148,-0.516,-0.0296,0.2276,5.7661,0.5468,0.534,0.2702,-0.4179,0.0011]} ] }