How it works...
We need to create an API to take the inputs from end users and generate the output. The end user will upload a CSV file with the inputs, and API returns the prediction output back to the user.
In step 1, we added schema for the input data. User input should follow the schema structure in which we trained the model except that the Exited label is not added because that is the expected task for the trained model. In step 2, we have created TransformProcess from Schema that was created in step 1.
In step 3, we used TransformProcess from step 2 to create a record reader instance. This is to load the data from the dataset.
We expect the end users to upload batches of inputs to generate outcomes. So, an iterator needs to be created ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access