[
https://issues.apache.org/jira/browse/JENA-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804384#comment-16804384
]
Marco Neumann commented on JENA-1693:
-------------------------------------
[~ajs6f], I did use and agreed with [~andy.seaborne] to use the most recent
Apache Commons Math library (3.6.1) for the job in Jena.
I did test it with a simple Custom Aggregate returning: median = new
Median().evaluate(arrDouble) ) , but here I believe it would preferably had to
go into the SPARQL grammar file (arq.jj) and the package
org.apache.jena.sparql.expr.aggregate to be accessible via Syntax.syntaxARQ in
SPARQL. It's the one set by default in the fuseki release correct?
but not sure if the extended statistics functions strictly fall into this
category here. They are not part of the SPARQL 1.1 specification.
> Add Aggregate Function MEDIAN To SPARQL ARQ Syntax
> --------------------------------------------------
>
> Key: JENA-1693
> URL: https://issues.apache.org/jira/browse/JENA-1693
> Project: Apache Jena
> Issue Type: New Feature
> Environment: general
>
> Reporter: Marco Neumann
> Priority: Minor
> Labels: features
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> As briefly mentioned to Andy Seaborne I'd like to see the aggregate function
> MEDIAN in the ARQ SPARQL syntax.
> "Median is the value that separates lower half from the higher half when the
> values are ordered in ascending or descending order. It is the middle value
> in a given dataset. Medians are helpful in understanding the distribution of
> data. This can be done by comparing mean and median values. By observing the
> difference between these values we can understand whether the data is left
> skewed or right skewed. The formula for median is: Median = ((n + 1)/2) th
> number in the series where the numbers are ordered. Here, n denotes the
> number of values for the given variable."
> DIVYA SPANDANA MARNEN, SPARQL-R: EXTENDED SPARQL FOR STATISTICAL COMPUTATIONS.
>
> example
>
> SELECT agg:median(?age) AS ?median
> WHERE
> { ?x ex:age ?age }
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)