[ https://issues.apache.org/jira/browse/SOLR10651?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=16127718#comment16127718
]
ASF subversion and git services commented on SOLR10651:

Commit 9ebdd846fd90989f04b0b94318ad78c14d0ee2dd in lucenesolr's branch refs/heads/master
from [~joel.bernstein]
[ https://gitwipus.apache.org/repos/asf?p=lucenesolr.git;h=9ebdd84 ]
SOLR10651: Statistical function docs for 7.0
> Streaming Expressions statistical functions library
> 
>
> Key: SOLR10651
> URL: https://issues.apache.org/jira/browse/SOLR10651
> Project: Solr
> Issue Type: New Feature
> Security Level: Public(Default Security Level. Issues are Public)
> Components: streaming expressions
> Reporter: Joel Bernstein
>
> This is a ticket for organizing the new statistical programming features of Streaming
Expressions. It's also a place for the community to discuss what functions are needed to support
statistical programming.
> Basic Syntax:
> {code}
> let(a = timeseries(...),
> b = timeseries(...),
> c = col(a, count(*)),
> d = col(b, count(*)),
> r = regress(c, d),
> tuple(p = predict(r, 50)))
> {code}
> The expression above is doing the following:
> 1) The let expression is setting variables (a, b, c, d, r).
> 2) Variables *a* and *b* are the output of timeseries() Streaming Expressions. These
will be stored in memory as lists of Tuples containing the time series results.
> 3) Variables *c* and *d* are set using the *col* evaluator. The col evaluator extracts
a column of numbers from a list of tuples. In the example *col* is extracting the count\(*\)
field from the two time series result sets.
> 4) Variable *r* is the output from the *regress* evaluator. The regress evaluator performs
a simple regression analysis on two columns of numbers.
> 5) Once the variables are set, a single Streaming Expression is run by the *let* expression.
In the example the *tuple* expression is run. The tuple expression outputs a single Tuple
with name/value pairs. Any Streaming Expression can be run by the *let* expression so this
can be a complex program. The streaming expression run by *let* has access to all the variables
defined earlier.
> 6) The tuple expression in the example has one name / value pair. The name *p* is set
to the output of the *predict* evaluator. The predict evaluator is predicting the value of
a dependent variable based on the independent variable 50. The regression result stored in
variable *r* is used to make the prediction.
> 7) The output of this expression will be a single tuple with the value of the predict
function in the *p* field.
> The growing list of issues linked to this ticket are the array manipulation and statistical
functions that will form the basis of the stats library. The vast majority of these functions
are backed by algorithms in Apache Commons Math. Other machine learning and math libraries
will follow.

This message was sent by Atlassian JIRA
(v6.4.14#64029)

To unsubscribe, email: devunsubscribe@lucene.apache.org
For additional commands, email: devhelp@lucene.apache.org
