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.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Anomaly Detection.
    2. Choose a compartment that you have permission to work in.
    3. Click a project's name, or use the Actions menu next to the name.
    4. Click Detect Anomalies.
    5. Browse for or drag and drop the CSV or JSON file that contains dataset in the Detect Anomalies box.
    6. Click Detect.

      The anomalies are represented in a list of columns that can be visualized.

    7. Select a column label to view the detected anomalies.
      Each visualization can be viewed by selecting a different column label from the list.
    8. If you want to view or use the generated anomalies JSON file, click Download JSON.

    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.

    1. Download and configure OCI CLI or SDK as described in existing OCI documentation.
    2. Use a trained model by creating an HTTP POST request and make the request to the endpoint received in the previous step.
    3. 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:

    1. Get the model:

      https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/models/{ModelId}
       Method: GET
       Body:
    2. 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.

    1. Download and configure OCI CLI or SDK as described in existing OCI documentation.
    2. Use a trained model by creating an HTTP POST request and make the request to the endpoint received in the previous step.
    3. 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.

    1. Get the model:

      https://anomalydetection.aiservice.us-phoenix-1.oci.oraclecloud.com/20210101/models/{ModelId}
       Method: GET
       Body:
    2. 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]}
          ]
      }