W3C home > Mailing lists > Public > www-rdf-logic@w3.org > February 2004

Strategies for inference over lists of values

From: Graham Klyne <gk@ninebynine.org>
Date: Fri, 27 Feb 2004 17:42:02 +0000
Message-Id: <>
To: RDF interest group <www-rdf-interest@w3.org>, <www-rdf-logic@w3.org>


I'm wondering what strategies folks are using for inference over 
collections (lists) of values in RDF (other than resorting to ad-hoc 
code).  (Maybe also over containers, but the closure of lists makes the 
problem easier to define.)

A simple example would be the selection of the maximum value from a list; e.g.


       ( "10"^^xsd:integer "12"^^xsd:integer "15"^^xsd:integer
         "16"^^xsd:integer "14"^^xsd:integer "17"^^xsd:integer
         "13"^^xsd:integer "12"^^xsd:integer "10"^^xsd:integer
         "9"^^xsd:integer  "7"^^xsd:integer  "6"^^xsd:integer ) .

how to deduce:

     :maxTemperature "17"^^xsd:integer .

A more complex example might be the extraction of a mean value given a list 
of sample values and observed frequencies:

    :samples ( _:s1 _:s2 _:s3 _:s4 ) .
  _:s1 :value "10"^^xsd:integer ;
       :freq  "2"^^xsd:integer .
  _:s2 :value "20"^^xsd:integer ;
       :freq  "5"^^xsd:integer .
  _:s3 :value "30"^^xsd:integer ;
       :freq  "6"^^xsd:integer .
  _:s4 :value "40"^^xsd:integer ;
       :freq  "3"^^xsd:integer .

to deduce:

      _meanValue "26"^^xsd:integer

with access to normal arithmetic functions.

This can be done by generating intermediate resources that relate to 
accumulated values from the list, but this approach rapidly becomes very 
ugly.  I have some half-baked ideas for a tidier approach, but was hoping 
that someone might have a fully-baked solution.


Graham Klyne
For email:
Received on Friday, 27 February 2004 12:42:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:27 UTC