eland.ml.MLModel#
- class eland.ml.MLModel(es_client: Union[str, List[str], Tuple[str, ...], Elasticsearch], model_id: str)#
A machine learning model managed by Elasticsearch. (See https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference.html)
These models can be created by Elastic ML, or transformed from supported Python formats such as scikit-learn or xgboost and imported into Elasticsearch.
The methods for this class attempt to mirror standard Python classes.
- __init__(es_client: Union[str, List[str], Tuple[str, ...], Elasticsearch], model_id: str)#
Parameters#
- es_client: Elasticsearch client argument(s)
elasticsearch-py parameters or
elasticsearch-py instance
- model_id: str
The unique identifier of the trained inference model in Elasticsearch.
Methods
__init__
(es_client, model_id)Parameters es_client: Elasticsearch client argument(s) elasticsearch-py parameters or elasticsearch-py instance
Delete an inference model saved in Elasticsearch
Check if the model already exists in Elasticsearch
import_ltr_model
(es_client, model_id, model, ...)Transform and serialize a trained 3rd party model into Elasticsearch.
import_model
(es_client, model_id, model, ...)Transform and serialize a trained 3rd party model into Elasticsearch.
predict
(X)Make a prediction using a trained model stored in Elasticsearch.
Attributes
feature_names
model_type
results_field