Re: Decision tree schema

Dear Nicholas,
Dear Timothy,

Thank you both for your input. The information is very valuable for me.

My goal is to make legal/law decision trees crawlable and understandable for machines using a set standard (i.e. schema.org).

Currently the decision trees I use have a custom, but simple nested XML structure and are not crawlable or understandable (standalone) for machines. They are visualized (question by question/choice by choice) dynamically using JavaScript (jQuery). Due to the dynamic visualisation the whole decision tree is loaded into the browser using one certain URL. There is no communication with the server while making a choice and there are no URLs for the specific questions/choices in a decision tree, because the whole decision path/data is already loaded in the browser. Currently I am not planning to use prerender.io or SEO.js to make the decision tree crawlable. Therefore I asked my initial question, as I wondered whether a schema for a decision tree already exists, or at least a way to translate the XML nested decision tree into JSON-LD.

I am convinced, that having a decision tree schema is very useful. On one hand a decision tree is a logical and easy to understand way to visualize the decision making process (for humans). On the other hand it is a logical path for the machine to make a decision (using the human logic defined in the decision tree/schema).

In my specific case: translating paragraphs of legal acts/documents into a decision tree is firstly comprehensible for humans, secondly it is a path for decision making for machines whenever they have enough input information.

At first glance PMML seems to be a solution. The only issue with PMML is, that it is way to big and complicated for this small project. Currently the source code of the nested XML is very easy to understand by humans, with minimal technical knowledge and it is very easy to traverse branches, calculate the depth of the decision tree/branch and even make jumps between branches.

I hope this explain my goal clearly.

Would appreciate any input concerning translating a nested XML to a schema.org schema.

Thank you in advance.

Best regards,
Krzysztof

> Am 26.04.2017 um 03:56 schrieb Nicolas Torzec <torzecn@yahoo-inc.com>:
> 
> Krzysztof,
> What is your goal?
> 
> RIF was designed to encode and exchange (business) rules in a formal way using (extensions of) first-order logic. PMML was designed to serialize and exchange predictive models such as decision trees and other (statistical) ML models. It is supported by libraries such as R, Scikit-Learn, or Spark/mllib.
> 
> -N.
> 
> On Tuesday, April 25, 2017, 6:27:31 PM PDT, Timothy Holborn <timothy.holborn@gmail.com> wrote:
> 
> 
> On Wed, 26 Apr 2017 at 11:10 Nicolas Torzec <torzecn@yahoo-inc.com <mailto:torzecn@yahoo-inc.com>> wrote:
> Krzysztof,
> The closest thing to a standard schema for predictive models such as decision trees is PMML. PMML is an XML-based interchange format for predictive models such as decision tree, linear regression, etc. 
> 
> See https://en.wikipedia.org/wiki/Predictive_Model_Markup_Language <https://en.wikipedia.org/wiki/Predictive_Model_Markup_Language>. 
> 
> Cheers.
> N.
> 
> 
> 
> On Thursday, April 20, 2017, 12:28:40 AM PDT, Krzysztof Tomasz Zembrowski <krzysztof@zembrowski.com <mailto:krzysztof@zembrowski.com>> wrote:
> Dear all,
> 
> does a schema for a decision tree structure exist?
> 
> I'm wondering whether it's reasonable to output the whole decision tree (with all questions, decision possibilities and answers [the whole tree with all branches]) in the ld+json format.
> 
> Moreover, does it makes sense to nest it, like the following example:
> 
> Question
> __ Choice
> ____ Answer
> __ Choice
> ____ Question
> ______ Choice
> ________ Answer
> ______ Choice
> ________ Answer
> cf. https://jsfiddle.net/zembrowski/q50L7t6f/ <https://jsfiddle.net/zembrowski/q50L7t6f/>
> 
> or
> 
> make it completely flat (with or without dependencies), like this example:
> 
> Question1
> Question2
> Choice1_1
> Choice1_2
> Choice2_1
> Choice2_2
> Answer1
> Answer2
> Answer3
> and add a parameter to each element with the correlation.
> cf. https://jsfiddle.net/zembrowski/hevu3jof/ <https://jsfiddle.net/zembrowski/hevu3jof/>
> 
> Would be more than happy to read your thoughts on this topic.
> 
> See RIF / OWL: https://www.w3.org/TR/rif-rdf-owl/ <https://www.w3.org/TR/rif-rdf-owl/>   
> 
> 
> Thank you in advance. 
> 
> Best regards,
> Krzysztof

Received on Sunday, 30 April 2017 12:08:20 UTC