Machine learning custom algorithms
If the selection of built-in machine learning algorithms do not meet your requirements, you can package and deploy custom algorithm code.
Custom algorithms can be used for control over the entire data science pipeline. You can package and deploy your own custom algorithm code, apply it to the model training, and use the model to get predictions on new data.
There are the two options for bringing in custom algorithm code:
- Upload a prepared source code file.
- Use the Jupyter notebook to prepare the code and package the custom algorithm files.
The custom algorithm source code file must contain two essential scripts:
- train: The program that is invoked to train the model.
- predictor.py: The program that implements the Flask web server that can be called to get predictions from the trained model.
The custom algorithm source code file must be compressed (zipped) and contain the train and predictor.py placed in the top-level directory. The supported programming language for the scripts is Python.
The hyperparameters are passed in a hyperparameters.json file, as a JSON-formatted dictionary of hyperparameter names to values.
Other supportive routines, programs, or libraries can be included and packed within the compressed source file.