Save a Model to a OML4Py Datastore
You can store spatial models and Python objects in the OML4Py datastore and use them for other tasks.
The following code shows how to save a model into the OML4Py datastore. The example uses
a Python object, my_model
, which represents a spatial estimator (such
as a regressor, classifier, or some other estimator). The model is saved as
sai_ds
in a datastore with an empty description. Note that by
setting overwrite=True
, any existing datastore with the same name is
replaced.
import oml
oml.ds.save({'spatial_model': my_spatial_model}, 'sai_ds', description='some description', overwrite=True)
See Save Objects to a Datastore in Oracle Machine Learning for Python User’s Guide for more information.