layer.Model
class Model()
Provides access to ML models trained and stored in Layer.
You can retrieve an instance of this object with layer.get_model()
.
This class should not be initialized by end-users.
# Fetches a specific version of this model
layer.get_model("churn_model:1.2")
get_train()
Returns the trained and saved model artifact. For example, a scikit-learn or PyTorch model object.
Returns
The trained model artifact.
Return type
ModelObject
predict()
Performs prediction on the input dataframe data. :return: the predictions as a pd.DataFrame
Parameters
input_df (pandas.core.frame.DataFrame) --
Return type
pandas.core.frame.DataFrame