Train Models
Once one or more datasets are successfully uploaded, the next step is to initiate model training.
The procedure for training models is as follows:
- Initiate Training: Call
POST /start_trainer
with a list of dataset IDs in the body. This endpoint will return a job ID.
Training payload format
required | Array of objects (Start Trainer Request Dataset Ids) List with objects containing the parameters for each dataset. |
object Details for the webhook endpoint to call when a job finishes. |
{- "parameters": [
- {
- "datasetId": "6d1943e0-46b2-4265-8283-499a735f427e",
- "customerId": "fad5e0e4-2c4f-41cc-84f0-123973913f14",
- "rebuildModels": true
}
],
}
It is advisable to conduct a full rebuild weekly, complemented by daily model updates (without rebuild). Given that a full rebuild is more time-consuming than a simple update, this schedule balances maintaining model accuracy with operational efficiency.
- Check Status: Use
GET /status
with the Job ID in the header until it returns 200 with status="success", or employ the webhook functionality as described in the webhook section. Once the status endpoint indicates "success," the model training is complete for the requested datasets, and the client can move on to generating predictions.
Model hierarchy
- Description
- Diagram
There can be differnt patterns in the data depending on things like which projects the registration was made on, in which department or work-category. To accomodate for this, TimeDetect creates a hierarchy of sub-models, each sub-model tailored to learn the patterns of that specific sub-group
For example, if an employee has enough data, she gets her own tailored employee sub-model. This is considered the most specific model level for a registration, so TimeDetect will always prioritize predictions from this model if it exists. If the employee does not have (recent) enough to fulfill the model requirements of an employee model, predictions will be returned from up the model hierarchy, e.g. on the work-category level.
Model requirements
To accurately capture the patterns in data, our model creation process necessitates a minimum number of registrations. The required amount of data needed to capture the underlying patterns in time registrations depends on the pattern complexity. For more complex data patterns, more data points are required, and vice versa.
Requirements for TimeDetect to build models are dynamically calculated through an analysis of the data, which allows for adjustments as new data is uploaded.
As a minimum, regardless of complexity analysis, the requirements are as follows:
- General Level: 200-500 registrations in the dataset, spread over at least 30 unique days.
- Department/Work Type/Project Levels: 100-200 registrations for the department/w rk type/project, spread over at least 30 unique days.
- Employee Level: 50-100 registrations for the employee, spread over at least 30 unique days.
- Employee Aggregated Level: 30-50 (aggregated) registrations for the employee, in the last 50 days.
All data utilized must be no older than 360 days to maintain data relevance and accuracy.