I am trying to implement a decision tree in Racket manually to see how it works. I have this structure:
(define-struct node
(list : childs
class attribute type ))
and my function:
(define tree-1
(node '((node null 'round 'yes null) (node null 'square 'yes null)) 'shape null null))
Basically I want a tree with 3 nodes as follow:
;; shape
;; / \
;; round square
(yes) (no)
"Yes" and "no" are representing the classes for each atribute.
I get the following error: node: expects 6 arguments, given 4: '((node null 'round 'yes null) (node null 'square 'yes null)) 'shape '() '() but my node should take 4 arguments so i do not see where the problem is.