Skip to main content

Create Predictions

Once the training phase for datasets is concluded, TimeDetect allows for the generation of predictions. This involves analyzing each registration individually, providing a detailed set of attributes for every entry.

After model training, the system is ready to analyze data and provide predictive insights. Here’s how to proceed:

Using the prediction endpoints

Real-time Predictions: For quick, real-time predictions, direct your requests to the real_time_prediction endpoint. This is ideal for individual or small batches of registrations where immediate results are beneficial. This endpoint does not require you to call the GET /results endpoint afterwards. You will recieve the results as the response to this request directly.

For creating real-time predictions, execute the POST /real_time_prediction endpoint with the registrations you want predictions for.

Batch Predictions: For processing larger datasets, use the create_prediction endpoint. This method is suitable for analyzing extensive collections of registrations, including those that require aggregation or identify missing entries.

For creating batch predictions, execute POST /create_prediction with the registrations you want predictions for. To get the results, you have to call the GET /results endpoint after the prediction job has finished.

Client operations

The prediction process must be initiated for each Dataset, as outlined below:

  • 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.
  • Check Status:: 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.