-
Notifications
You must be signed in to change notification settings - Fork 1
/
rule.lisp
23 lines (20 loc) · 828 Bytes
/
rule.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;;
;; This file contains the code for defining
;; the rule structure.
;;
(in-package :cl-association-rules)
(defstruct (rule
(:print-function
(lambda (struct stream depth)
(declare (ignore depth))
(if (or (rule-pretuple struct)
(rule-posttuple struct)
(rule-support struct)
(rule-confidence struct))
(format stream "~a => ~a. Support is ~a and confidence is ~a."
(rule-pretuple struct)
(rule-posttuple struct)
(float (rule-support struct))
(float (rule-confidence struct)))
(format stream "New empty rule.~%")))))
pretuple posttuple support confidence)