[rules-users] Extracting management information from the content of the rules

Davide Sottara dsotty at gmail.com
Mon Jan 2 06:23:51 EST 2012


Out of curiosity, I'd like to better understand the requirements. Are we
talking about rules of the form:

when
  Product( color == "red", country == "Italy", discount > 10 )
then
 ...
end

i.e., the discount is stored in some field and constrained by the rules?

or

when
  $p : Product( color == "red", country == "Italy", $x : price )
then
  $p.setPrice( $x * 0.75 )
end  

More properly, the questions are : 1) is the discount given or computed? 2)
is it available (or can be stored) in some data field or is it "transient" ?

The RHS of a rule is a sort of "black box" which is more difficult to reason
against, so you'll probably need some kind of reified discount:

when
  $p : Product( color == "red", country == "Italy" )
then
  insertLogical( new Discount( $p, 0.75 ) );
end  

-----------------------------------------------------------------------------------------------------------------

This said, there is a final, more important question. Are you interested in
a report describing the 
characteristics of the objects which were discounted?
For example, you have 1000 discounted products in your system and you want
to find a "POSTERIOR"
correlation between their features and the discount they got. This is the
kind of problems that 
are solved by data mining techniques, e.g. CARTs (classification and
regression trees), Association Rules (not the rules we're used to !!) or
Clustering algorithms

If instead you want to reason abstractly, using the definitions contained in
the rules' LHSs to understand which classes of objects COULD receive some
kind of discount, that's a kind of "semantic" problem and I guess that some
tableau-like technique could help.

This to say that, according to the exact type of "reporting" that you want
to build, the "rules" you'd have to write might vary quite a lot.

Best
Davide

--
View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Extracting-management-information-from-the-content-of-the-rules-tp3625961p3626354.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list