Making chap-compatible train and predict endpoints

To integrate a component for standardized, interoperable use, it must follow an established standard. CHAP defines one such standard, and by adhering to it, your code gains all the benefits of seamless platform integration. In predictive modeling and machine learning, it is a long-established best practice to provide separate functions for training and prediction.

The following figure shows the basic overview of how CHAP expects modelling code to be, i.e. divided into separated train and predict parts

External model structure

The figure below shows how the chap platform orchestrates training and prediction of your model using the same endpoints as above:

External model interaction

The exact way of specifying the train and predict endpoints are described here.

Standardised data format

Part of the standardised interface is to rely on a standardised data format (for the “historic data” and “weather forecast” data in the figure above). This is a simple csv format. An example is provided in the minimalist_example respository, where the training data is as follows:

time_period,rainfall,mean_temperature,disease_cases,location
2023-05,10,30,200,loc1
2023-06,2,30,100,loc1