Presentation is loading. Please wait.

Presentation is loading. Please wait.

Teaching a machine a simple taxonomy

Similar presentations


Presentation on theme: "Teaching a machine a simple taxonomy"— Presentation transcript:

1 Teaching a machine a simple taxonomy
Scott Doherty

2 What's a Taxonomy? A taxonomy is a hierarchy of objects organized in a type / subtype tree through the ”is-a” relation.

3 Why is this hard? Multiple taxonomies Data modeling
Overlapping classes– degenerates to graph Multiple inheritance Relations – which ones? Top down vs. Bottom up

4 Multiple taxonomies Linnaean taxonomy Sea, Land, Air Beasts
Ad hoc taxonomies

5 Data Modeling How do we represent a thing?
Attribute Value List <K,V> Propositionalized Attributes 0,1 Database Schema Inheritance – Java like (I get what my parents have, but I don't show you that)

6 Multiple Inheritance Multiple inheritance is where a class is the descendant of two classes This is a graph and not a tree

7 Solution: duplication
Now a strict hierarchy but we don't have a unique path to every object Space requirements and pedigree tracing are hard

8 The Program A basic ontology Cars, baskets, balls
Red things, blue things, green things Basic relations Sub type – more detail, more specific Super type – less detail, more general Instance – same attribute list

9 Code – classes: agent (defclass agent () (
(name :accessor agent-name :initarg :name) (base-types-of-things :accessor agent-base-types-of-things :initform () :initarg :base-types-of- things) (base-relations :accessor agent-base-relations :initform () :initarg :base-relations ) (learned-types-of-things :accessor agent-learned-types-of-things :initform () :initarg :learned- types-of-things ) (learned-relations :accessor agent-learned-relations :initform () :initarg :learned-relations ) )

10 Code – classes: thing (defclass type-of-thing() (
(name :accessor type-of-thing-name :initarg :name) (attributes :accessor type-of-thing-attributes :initform () :initarg :attribures ) ) (defclass thing () ( (name :accessor thing-name :initarg :name) (attributes :accessor thing-attributes :initform () :initarg :attribures)

11 Code - relations (defmethod is-sub-class-of-type((newtype type-of-thing)(a agent) &Aux known-types) (setf known-types (agent-base-types-of-things a)) (setf new-type-attributes (type-of-thing-attributes newtype)) (dolist (thing (agent-base-types-of-things a)) (setf newlist (getKeys (type-of-thing-attributes newtype))) (setf knownlist (getKeys (type-of-thing-attributes thing))) (setf flag (subsetp knownlist newlist :test 'equal)) ;returns t only if list1 is a subset of list2 (if (equal flag nil) (format t "not a sub-class~%") (format t "is a sub-class~%") )

12 Demos Break 2 [3]> (demoPredicateSuperSet) Learning agent ...
name = Taxonomizer 2000 classes ... 2DSHAPE ((ANGLES . 3) (SIDES . 3) (NAME . 2DSHAPE)) relations ... IS-INSTANCE-OF-TYPE IS-SUPERCLASS-OF-TYPE IS-SUBCLASS-OF-TYPE CHECKING IF new item IS AN INSTANCE OF OBJECT known item ===========================================comparing base object to compare new object to compare ((ANGLES . 4) (SIDES . 4) (COLOR . RED) (NAME . 2DSHAPE)) base type size 3 new type size 4 set difference NIL is an instance =========================================== finished comparing NIL

13 Where am I? Can create objects with their attributes (data modeling)
Can check if a thing is a sub-type, super-type or instance of another type of thing (relations) Have run into the multiple inheritance problem, and am working on how to organize tree structure


Download ppt "Teaching a machine a simple taxonomy"

Similar presentations


Ads by Google