Linear regression model has been a mainstay of statistics and machine learning in the past decades and remains one of the most important tools in context of supervised learning algorithms. It’s a powerful technique for prediction of the value of a dependent variable y
(called response variable) given the values of another independent variables x = (x1, x2,…,xC)
(called explanatory variables) based on a training data set. Prediction of the response variable with respect to the input values for the explanatory variables is described by the linear hypothesis function h(x)
with
This plugin enhances Elasticsearch’s query engine by two new aggregations, which utilize the index data during search for estimating a linear regression model in order to expose information like prediction of a value for the target variable, anomaly detection and measuring the accuracy or rather predictiveness of the model.
The aggregations estimate the linear regression coefficients based on document results of a search query. Each search result document is handled as an observation and the numerical fields as variables (explanatory and response) for the linear model.
The linreg_stats
aggregation is a numeric aggregation that computes statistics for the estimated linear regression model over a set of document fields standing for the response and the explanatory variables.
For installing this plugin please choose first the proper version under the compatible matrix which matches your Elasticsearch version and use the download link for the following command.
./bin/elasticsearch-plugin install https://github.com/scaleborn/elasticsearch-linear-regression/releases/download/5.3.0.1/elasticsearch-linear-regression-5.3.0.1.zip
The plugin will be installed under the name "linear-regression". Do not forget to restart the node after installing.
Plugin version | Elasticsearch version | Release date |
5.3.0 | Jun 1, 2017 |