Basic questions on reasoning about individuals and QCR

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic questions on reasoning about individuals and QCR

resus
Hi!

I have a few questions about knowledge inference with individuals and
qualified cardinality restrictions. I think I misunderstand some basics
here, hence my questions. Let’s take the Pizza ontology as example
(http://130.88.198.11/co-ode-files/ontologies/pizza.owl). I am using Protégé
4.3.0 (Build 304).

I transform the original Margherita class into a defined class in the form
of:
Equivalent To: NamedPizza and (hasTopping some MozzarellaTopping) and
(hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
TomatoTopping))

I added an individual TomatoTopping_Std, MozzarellaTopping_Std and
ThinAndCrispyBase_Std. When creating an individual PizzaMargherita_1 without
assigning it to any class but only giving it the object property assertions
hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std the Pellet reasoner cannot infer that this individual
belongs to the Margherita class. To my understanding, it should place it
there.

Question 1: Why is this inference not possible? (I am sure that this worked
the other day)

Further, I added an individual PizzaMargherita_2 of type Margherita. I am
sure that the other day when running the reasoner it inferred the hasTopping
TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std properties. I recall this because I did not expect
this result. At the time this worked, the individual PizzaMargherita_1 was
also inferred to be a Margherita pizza, as the reasoner inferred both
individuals to be the same.

Question 2: Why did this happen? Can the reasoner really determine that
hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std must hold as these are the only individuals of the
respective classes?

Next, I defined an alternative description of a Margherita pizza
MarghertiaAlternative with a qualified cardinality restriction in the
following way:
Equivalent To: NamedPizza and (hasTopping exactly 1 MozzarellaTopping) and
(hasTopping exatly 1 TomatoTopping) and (hasTopping only (MozzarellaTopping
or TomatoTopping))

Question 3: Is this one correct way to model a defined Margherita pizza?

The version of the pizza ontology including the classes and individuals
described above is attached. Thank you for your answers in advance!

Best, Thomas


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

pizza.owl (80K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

kcoyle
I'm curious about all of the "DisjointClasses/Properties" statements in
your ontology. Did you consciously add those, or was that added on by
Protege? In any case, I would look to see if those are interfering with
your complex pizza descriptions.

(I've seen other cases like this of "everything disjoint everything
else" in ontologies, and I assume it's 1) unnecessary 2) may have
unforeseeable ramifications. Anyone want to comment on that?)

kc

On 7/11/14, 10:55 AM, [hidden email] wrote:

> Hi!
>
> I have a few questions about knowledge inference with individuals and
> qualified cardinality restrictions. I think I misunderstand some basics
> here, hence my questions. Let’s take the Pizza ontology as example
> (http://130.88.198.11/co-ode-files/ontologies/pizza.owl). I am using Protégé
> 4.3.0 (Build 304).
>
> I transform the original Margherita class into a defined class in the form
> of:
> Equivalent To: NamedPizza and (hasTopping some MozzarellaTopping) and
> (hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
> TomatoTopping))
>
> I added an individual TomatoTopping_Std, MozzarellaTopping_Std and
> ThinAndCrispyBase_Std. When creating an individual PizzaMargherita_1 without
> assigning it to any class but only giving it the object property assertions
> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std the Pellet reasoner cannot infer that this individual
> belongs to the Margherita class. To my understanding, it should place it
> there.
>
> Question 1: Why is this inference not possible? (I am sure that this worked
> the other day)
>
> Further, I added an individual PizzaMargherita_2 of type Margherita. I am
> sure that the other day when running the reasoner it inferred the hasTopping
> TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std properties. I recall this because I did not expect
> this result. At the time this worked, the individual PizzaMargherita_1 was
> also inferred to be a Margherita pizza, as the reasoner inferred both
> individuals to be the same.
>
> Question 2: Why did this happen? Can the reasoner really determine that
> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std must hold as these are the only individuals of the
> respective classes?
>
> Next, I defined an alternative description of a Margherita pizza
> MarghertiaAlternative with a qualified cardinality restriction in the
> following way:
> Equivalent To: NamedPizza and (hasTopping exactly 1 MozzarellaTopping) and
> (hasTopping exatly 1 TomatoTopping) and (hasTopping only (MozzarellaTopping
> or TomatoTopping))
>
> Question 3: Is this one correct way to model a defined Margherita pizza?
>
> The version of the pizza ontology including the classes and individuals
> described above is attached. Thank you for your answers in advance!
>
> Best, Thomas
>
>
>
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>

--
Karen Coyle
[hidden email] http://kcoyle.net
m: 1-510-435-8234
skype: kcoylenet
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

Patel-Schneider, Peter
Well, the lack of valid disjointness axioms is a very common problem in
ontologies, preventing lots of useful inferences, so I, personally, am happy
to see ontologies with a significant number of disjointness axioms.

That said, reflexively adding disjointness axioms is just as bad as adding none.

peter


On 07/11/2014 11:18 AM, Karen Coyle wrote:

> I'm curious about all of the "DisjointClasses/Properties" statements in your
> ontology. Did you consciously add those, or was that added on by Protege? In
> any case, I would look to see if those are interfering with your complex pizza
> descriptions.
>
> (I've seen other cases like this of "everything disjoint everything else" in
> ontologies, and I assume it's 1) unnecessary 2) may have unforeseeable
> ramifications. Anyone want to comment on that?)
>
> kc
>
> On 7/11/14, 10:55 AM, [hidden email] wrote:
>> Hi!
>>
>> I have a few questions about knowledge inference with individuals and
>> qualified cardinality restrictions. I think I misunderstand some basics
>> here, hence my questions. Let’s take the Pizza ontology as example
>> (http://130.88.198.11/co-ode-files/ontologies/pizza.owl). I am using Protégé
>> 4.3.0 (Build 304).
>>
>> I transform the original Margherita class into a defined class in the form
>> of:
>> Equivalent To: NamedPizza and (hasTopping some MozzarellaTopping) and
>> (hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
>> TomatoTopping))
>>
>> I added an individual TomatoTopping_Std, MozzarellaTopping_Std and
>> ThinAndCrispyBase_Std. When creating an individual PizzaMargherita_1 without
>> assigning it to any class but only giving it the object property assertions
>> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
>> ThinAndCrispyBase_Std the Pellet reasoner cannot infer that this individual
>> belongs to the Margherita class. To my understanding, it should place it
>> there.
>>
>> Question 1: Why is this inference not possible? (I am sure that this worked
>> the other day)
>>
>> Further, I added an individual PizzaMargherita_2 of type Margherita. I am
>> sure that the other day when running the reasoner it inferred the hasTopping
>> TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
>> ThinAndCrispyBase_Std properties. I recall this because I did not expect
>> this result. At the time this worked, the individual PizzaMargherita_1 was
>> also inferred to be a Margherita pizza, as the reasoner inferred both
>> individuals to be the same.
>>
>> Question 2: Why did this happen? Can the reasoner really determine that
>> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
>> ThinAndCrispyBase_Std must hold as these are the only individuals of the
>> respective classes?
>>
>> Next, I defined an alternative description of a Margherita pizza
>> MarghertiaAlternative with a qualified cardinality restriction in the
>> following way:
>> Equivalent To: NamedPizza and (hasTopping exactly 1 MozzarellaTopping) and
>> (hasTopping exatly 1 TomatoTopping) and (hasTopping only (MozzarellaTopping
>> or TomatoTopping))
>>
>> Question 3: Is this one correct way to model a defined Margherita pizza?
>>
>> The version of the pizza ontology including the classes and individuals
>> described above is attached. Thank you for your answers in advance!
>>
>> Best, Thomas
>>
>>
>>
>> _______________________________________________
>> protege-user mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/protege-user
>>
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

Matthew Horridge-2
Administrator
In reply to this post by resus

On 11 Jul 2014, at 10:55, <[hidden email]> <[hidden email]> wrote:

> Hi!
>
> I have a few questions about knowledge inference with individuals and
> qualified cardinality restrictions. I think I misunderstand some basics
> here, hence my questions. Let’s take the Pizza ontology as example
> (http://130.88.198.11/co-ode-files/ontologies/pizza.owl). I am using Protégé
> 4.3.0 (Build 304).
>
> I transform the original Margherita class into a defined class in the form
> of:
> Equivalent To: NamedPizza and (hasTopping some MozzarellaTopping) and
> (hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
> TomatoTopping))
>
> I added an individual TomatoTopping_Std, MozzarellaTopping_Std and
> ThinAndCrispyBase_Std. When creating an individual PizzaMargherita_1 without
> assigning it to any class but only giving it the object property assertions
> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std the Pellet reasoner cannot infer that this individual
> belongs to the Margherita class. To my understanding, it should place it
> there.

> Question 1: Why is this inference not possible? (I am sure that this worked
> the other day)

No, it won’t.  The reason is that your definition of MargheritaPizza include (hasTopping only (MozzarellaTopping or TomatoTopping)) and the reasoner cannot prove that your individual only has the stated toppings.  You need to “close off” the description of your individual one way or another.  There are various ways to do this.  You could say something like

individual Type hasTopping only ({TomatoTopping_Std} or {MozzarellaTopping_Std})

or if TomatoTopping_Std and MozzarellaTopping_Std are different individuals you could say something like

individual Type hasTopping max 2

and some other ways.

> Further, I added an individual PizzaMargherita_2 of type Margherita. I am
> sure that the other day when running the reasoner it inferred the hasTopping
> TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std properties. I recall this because I did not expect
> this result. At the time this worked, the individual PizzaMargherita_1 was
> also inferred to be a Margherita pizza, as the reasoner inferred both
> individuals to be the same.

This sounds strange.  The only way this would happen is if you had other axioms in your ontology that would cause this to be entailed.

> Question 2: Why did this happen? Can the reasoner really determine that
> hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
> ThinAndCrispyBase_Std must hold as these are the only individuals of the
> respective classes?

No.

> Next, I defined an alternative description of a Margherita pizza
> MarghertiaAlternative with a qualified cardinality restriction in the
> following way:
> Equivalent To: NamedPizza and (hasTopping exactly 1 MozzarellaTopping) and
> (hasTopping exatly 1 TomatoTopping) and (hasTopping only (MozzarellaTopping
> or TomatoTopping))
>
> Question 3: Is this one correct way to model a defined Margherita pizza?

It depends upon how you want to model things.  It is more specific that the first definition and you’ll find that MarghertiaAlternative will be entailed to be a subclass of MargheritaPizza.  With the somevalues from restrictions there can be multiple mozzarella and multiple tomato toppings.  With the alternative, only one of each.

Hope this helps.

Cheers,

Matthew


> The version of the pizza ontology including the classes and individuals
> described above is attached. Thank you for your answers in advance!

>
> Best, Thomas
>
> <pizza.owl>_______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

Lorenz Buehmann
In reply to this post by resus
Hi,

regarding the 1. question:

This can not be inferred because of the Open World Assumption (OWA). PizzaMargherita_1 would have to fullfil all parts of the intersection
NamedPizza and (hasTopping some MozzarellaTopping) and
(hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
TomatoTopping))

In particluar we have
1. NamedPizza
2. hasTopping some MozzarellaTopping
3. hasTopping some TomatoTopping
4. hasTopping only (MozzarellaTopping or TomatoTopping)

From your description PizzaMargherita_1 only 2) and 3) hold so far. Even if 1) also holds, the problem with OWA comes from 4). It's possible that there are more toppings which are not of type MozzarellaTopping or TomatoTopping, thus, it can not be inferred by standard OWL semantics.

Lorenz
On 07/11/2014 07:55 PM, [hidden email] wrote:
Hi!

I have a few questions about knowledge inference with individuals and
qualified cardinality restrictions. I think I misunderstand some basics
here, hence my questions. Let’s take the Pizza ontology as example
(http://130.88.198.11/co-ode-files/ontologies/pizza.owl). I am using Protégé
4.3.0 (Build 304).

I transform the original Margherita class into a defined class in the form
of:
Equivalent To: NamedPizza and (hasTopping some MozzarellaTopping) and
(hasTopping some TomatoTopping) and (hasTopping only (MozzarellaTopping or
TomatoTopping))

I added an individual TomatoTopping_Std, MozzarellaTopping_Std and
ThinAndCrispyBase_Std. When creating an individual PizzaMargherita_1 without
assigning it to any class but only giving it the object property assertions
hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std the Pellet reasoner cannot infer that this individual
belongs to the Margherita class. To my understanding, it should place it
there.

Question 1: Why is this inference not possible? (I am sure that this worked
the other day) 

Further, I added an individual PizzaMargherita_2 of type Margherita. I am
sure that the other day when running the reasoner it inferred the hasTopping
TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std properties. I recall this because I did not expect
this result. At the time this worked, the individual PizzaMargherita_1 was
also inferred to be a Margherita pizza, as the reasoner inferred both
individuals to be the same. 

Question 2: Why did this happen? Can the reasoner really determine that
hasTopping TomatoTopping_Std, hasTopping MozzarellaTopping_Std, hasBase
ThinAndCrispyBase_Std must hold as these are the only individuals of the
respective classes? 

Next, I defined an alternative description of a Margherita pizza
MarghertiaAlternative with a qualified cardinality restriction in the
following way:
Equivalent To: NamedPizza and (hasTopping exactly 1 MozzarellaTopping) and
(hasTopping exatly 1 TomatoTopping) and (hasTopping only (MozzarellaTopping
or TomatoTopping))

Question 3: Is this one correct way to model a defined Margherita pizza?

The version of the pizza ontology including the classes and individuals
described above is attached. Thank you for your answers in advance! 

Best, Thomas



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

resus
Ok, I already thought that I need some sort of closure axiom on the individual to make this work but did not know how to write that. Now I have another question. Just like Matthew suggested, I added:
hasTopping only (({MozzarellaTopping_Std}) or ({TomatoTopping_Std}))

This is sufficient to infer that the individual is a Pizza and it is also inferred that it belongs to the MargheritaAlternative class (the one using QCR). However, looking at the individual tab it is not inferred that it belongs to the Margherita class. In the Margherita class the individual is listed as a member. Why would the Margherita class not show up as inferred type for the individual even if the individual is listed as inferred member in the class?

And then I have another general question: Is it possible to "restrict" the property assertions one can make for an individual or even show which assertions are required? I mean, much like Lorenz analyzed, the class description already defines which assertions must be set while most others are not allowed and, when set, make the ontology inconsistent. This is probably "wrong" from an OWA POV and is rather a relational database mindset, but wouldn't this often make sense? Coming back to the pizza example, if I add a Margherita individual, it is only allowed to have Mozzarella or Tomato toppings per definition while every other topping makes the ontology inconsistent. Still, I can freely define my Margherita individual to have e.g. a Ham topping in the property assertions. Well, I guess the inconsistency shows that it is wrong and I am just looking for a Poka-Yoke solution.

Thanks again for your answers! Thomas

 
Lorenz Bühmann wrote
In particluar we have
1. NamedPizza
2. hasTopping some MozzarellaTopping
3. hasTopping some TomatoTopping
4. hasTopping only (MozzarellaTopping or TomatoTopping)

 From your description PizzaMargherita_1 only 2) and 3) hold so far.
Even if 1) also holds, the problem with OWA comes from 4). It's possible
that there are more toppings which are not of type MozzarellaTopping or
TomatoTopping, thus, it can not be inferred by standard OWL semantics.
Reply | Threaded
Open this post in threaded view
|

Re: Basic questions on reasoning about individuals and QCR

resus
resus wrote
hasTopping only (({MozzarellaTopping_Std}) or ({TomatoTopping_Std}))
Correction: The definition is
NamedPizza and hasTopping only (({MozzarellaTopping_Std}) or ({TomatoTopping_Std}))

resus wrote
This is sufficient to infer that the individual is a Pizza and it is also inferred that it belongs to the MargheritaAlternative class (the one using QCR). However, looking at the individual tab it is not inferred that it belongs to the Margherita class. In the Margherita class the individual is listed as a member. Why would the Margherita class not show up as inferred type for the individual even if the individual is listed as inferred member in the class?
Could partially answer this myself. MarghertiaAlternative is inferred to be a subclass of Margherita, which is correct. A member of MargheritaAlternative is therefore also a member of Margherita. Still, the question as of why the individual is inferred to be of type MargheritaAlternative but not of type Margherita remains?!