Tue Oct 4 02:44:34 2022
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2017-03-01

LEARN

2022-10-04 | 2022-09-04 | 2022-08-04 | 2022-07-04 | 2022-06-04 | 2022-05-04 | 2022-04-04 | 2022-03-04 | 2022-02-04 | 2022-01-04 | 2021-12-04 | 2021-11-04 | 2021-10-04 | 2021-09-04 | 2021-08-04 | 2021-07-04 | 2021-06-04 | 2021-05-04 | 2021-04-04 | 2021-03-04 | 2021-02-04 | 2021-01-04 | 2020-12-04 | 2020-11-04 | 2020-10-04 | 2020-09-04 | 2020-08-04 | 2020-07-04 | 2020-06-04 | 2020-05-04 | 2020-04-04 | 2020-03-04 | 2020-02-04 | 2020-01-04 | 2019-12-04 | 2019-11-04 | 2019-10-04 | 2019-09-04 | 2019-08-04 | 2019-07-04 | 2019-06-04 | 2019-05-04 | 2019-04-04 | 2019-03-04 | 2019-02-04 | 2019-01-04 | 2018-12-04 | 2018-11-04 | 2018-10-04 | 2018-09-04 | 2018-08-04 | 2018-07-04 | 2018-06-04 | 2018-05-04 | 2018-04-04 | 2018-03-04 | 2018-02-04 | 2018-01-04 | 2017-12-04 | 2017-11-04 | 2017-10-04 | 2017-09-04 | 2017-08-04 | 2017-07-04 | 2017-06-04 | 2017-05-04 | 2017-04-04 | 2017-03-04 | 2017-02-04 | 2017-01-04 | 2016-12-04 | 2016-11-04 | 2016-10-04 | 2016-09-04 | 2016-08-04 | 2016-07-04 | 2016-06-04 | 2016-05-04 | 2016-04-04 | 2016-03-04 | 2016-02-04 | 2016-01-04 | 2015-12-04 | 2015-11-04 | 2015-10-04 | 2015-09-04 | 2015-08-04 | 2015-07-04 | 2015-06-04 | 2015-05-04 | 2015-04-04 | 2015-03-04 | 2015-02-04 | 2015-01-04 | 2014-12-04 | 2014-11-04 | 2014-10-04

Key: Value:

Key: Value:

MESSAGE
DATE 2017-03-24
FROM Ruben Safir
SUBJECT Subject: [Learn] Decision Tree
From learn-bounces-at-nylxs.com Fri Mar 24 17:36:11 2017
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82])
by mrbrklyn.com (Postfix) with ESMTP id 948BA161313;
Fri, 24 Mar 2017 17:36:11 -0400 (EDT)
X-Original-To: learn-at-nylxs.com
Delivered-To: learn-at-nylxs.com
Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62])
by mrbrklyn.com (Postfix) with ESMTP id A4252161311;
Fri, 24 Mar 2017 17:36:07 -0400 (EDT)
From: Ruben Safir
To: "learn-at-nylxs.com"
Message-ID: <2fbe6af3-f715-6c66-7749-a6ee299661e9-at-mrbrklyn.com>
Date: Fri, 24 Mar 2017 17:36:07 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
MIME-Version: 1.0
Subject: [Learn] Decision Tree
X-BeenThere: learn-at-nylxs.com
X-Mailman-Version: 2.1.17
Precedence: list
List-Id:
List-Unsubscribe: ,

List-Archive:
List-Post:
List-Help:
List-Subscribe: ,

Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: learn-bounces-at-nylxs.com
Sender: "Learn"

http://www.csie.ntu.edu.tw/~sylee/courses/clips/design.htm

12.3 Decision Tree
node structure

(deftemplate node
(slot name)
(slot type)
(slot question)
(slot yes-node)
(slot no-node)
(slot answer))

initialize

(defrule initialize
(not (node (name root)))
=>
(load-facts "animal.dat")
(assert (current-node root)))

ask the question

(deffunction ask-yes-or-no (?question)
(printout t ?question " (yes or no) ")
(bind ?answer (read))
(while (and (neq ?answer yes) (neq ?answer no))
(printout t ?question " (yes or no) ")
(bind ?answer (read)))
(return ?answer))

(defrule ask-decision-node-question
?node <- (current-node ?name)
(node (name ?name)
(type decision)
(question ?question))
(not (answer ?))
=>
(assert (answer (ask-yes-or-no ?question))))

response to the answer

(defrule proceed-to-yes-branch
?node <- (current-node ?name)
(node (name ?name)
(type decision)
(yes-node ?yes-branch))
?answer <- (answer yes)
=>
(retract ?node ?answer)
(assert (current-node ?yes-branch)))

(defrule proceed-to-no-branch
?node <- (current-node ?name)
(node (name ?name)
(type decision)
(no-node ?no-branch))
?answer <- (answer no)
=>
(retract ?node ?answer)
(assert (current-node ?no-branch)))

ask-if-answer-node-is-correct

(defrule ask-if-answer-node-is-correct
?node <- (current-node ?name)
(node (name ?name) (type answer)
(answer ?value))
(not (answer ?))
=>
(printout t "I guess it is a " ?value crlf)
(assert (answer (ask-yes-or-no "Am I correct?"))))

answer-node-guess

(defrule answer-node-guess-is-correct
?node <- (current-node ?name)
(node (name ?name) (type answer))
?answer <- (answer yes)
=>
(retract ?node ?answer))

(defrule answer-node-guess-is-incorrect
?node <- (current-node ?name)
(node (name ?name) (type answer))
?answer <- (answer no)
=>
(assert (replace-answer-node ?name))
(retract ?node ?answer))

replace-answer-node

(defrule replace-answer-node
?phase <- (replace-answer-node ?name)
?data <- (node (name ?name)
(type answer)
(answer ?value))
=>
(retract ?phase)
; Determine what the guess should have been

(printout t "What is the animal? ")
(bind ?new-animal (read))
; Get the question for the guess
(printout t "What question when answered yes ")
(printout t "will distinguish " crlf " a ")
(printout t ?new-animal " from a " ?value "? ")
(bind ?question (readline))
(printout t "Now I can guess " ?new-animal crlf)
; Create the new learned nodes

(bind ?newnode1 (gensym*))
(bind ?newnode2 (gensym*))
(modify ?data (type decision)
(question ?question)
(yes-node ?newnode1)
(no-node ?newnode2))
(assert (node (name ?newnode1)
(type answer)
(answer ?new-animal)))
(assert (node (name ?newnode2)
(type answer)
(answer ?value)))
)

--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
_______________________________________________
Learn mailing list
Learn-at-nylxs.com
http://lists.mrbrklyn.com/mailman/listinfo/learn

  1. 2017-03-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] neutal networks and pacman
  2. 2017-03-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Ultrametric networks: a new tool for phylogenetic analysis
  3. 2017-03-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] cost in evolution
  4. 2017-03-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] CatScan fossil files
  5. 2017-03-10 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] neural Networks and Quantum Mechanics
  6. 2017-03-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] I just found a GREAT video on partial derivatives
  7. 2017-03-13 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Contact DOJ and thell them to blow it out their ass
  8. 2017-03-14 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] CatScan fossil files
  9. 2017-03-14 Ramon Nagesan <ramon.nagesan-at-gmail.com> Re: [Learn] CatScan fossil files
  10. 2017-03-16 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] is this up
  11. 2017-03-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] hang out is down
  12. 2017-03-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] is this working
  13. 2017-03-16 Charlie Gonzalez <itcharlie-at-gmail.com> Subject: [Learn] Registration for The Perl Conference 2017 is now open!!
  14. 2017-03-16 From: "soledad.esteban" <soledad.esteban-at-icp.cat> Subject: [Learn] [dinosaur] Advanced course Geometric Morphometrics in R,
  15. 2017-03-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Advanced course Geometric Morphometrics in
  16. 2017-03-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] good news !
  17. 2017-03-18 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] circles
  18. 2017-03-20 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Alice
  19. 2017-03-20 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] hough transform - Lecture 9
  20. 2017-03-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Anyone understand this well
  21. 2017-03-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Digital mapping of dinosaurian tracksites
  22. 2017-03-22 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] ODBASE 2017 - The 16th International Conference on
  23. 2017-03-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Decision Tree
  24. 2017-03-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Genetic Modification with decent
  25. 2017-03-27 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Fwd: Re: hough transform - Lecture 9
  26. 2017-03-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] MOOCS
  27. 2017-03-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Peter Novig learning and on line teaching
  28. 2017-03-28 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] computations
  29. 2017-03-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] This is hard to understand what the logic is here
  30. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] This is hard to understand what the logic is here
  31. 2017-03-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] This is hard to understand what the logic is here
  32. 2017-03-29 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] This is hard to understand what the logic is here
  33. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] perseptors
  34. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] This is hard to understand what the logic is here
  35. 2017-03-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] This is hard to understand what the logic is here
  36. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] c arrays
  37. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] c arrays
  38. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] random weights
  39. 2017-03-30 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] randomize with commentary
  40. 2017-03-31 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Computational Paleo

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!