Skip to main content

Create Predictions

Once models are trained for each dataset, TimeDetect can generate predictions (find anomalies) for new time registrations. This involves analyzing each new registration individually and providing details on whether the registration is deviating from the normal working pattern or not.

  1. Create Prediction:: Execute POST /create_prediction or POST /real_time_prediction for real-time predictions, with a list of Dataset IDs. A Job ID will be returned.

    • Regular (batch) Predictions: For processing larger datasets and or getting aggregate results (considering several registrations, e.g., the total of the day is anomalous) or missing registrations (i.e., notification that some registration(s) seem to be missing compared to the regular working pattern).
    • Real-time Predictions: For individual or small batches of registrations where immediate results are needed. Results are returned in the response directly.
  2. Check Status: (applies to /create_prediction only): Use GET /status with the Job ID until a 200 status with "success" is returned, or use the webhook functionality.

Create prediction schema
required
Array of objects (Create Prediction Request Dataset Parameters)

Prediction parameters for each dataset.

object

Details for the webhook endpoint to call when a job finishes.

{
  • "parameters": [
    ],
  • "webhook": {}
}

Aggregate results

The aggregateForEmployeeIds is a list which should contain the employee-ids you'd like aggregated results for. Read more about aggregated results in the results section.