Individuals in Class Hierarchies Question

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

Individuals in Class Hierarchies Question

Lukas Maag
Hello
I have 4 individuals that are asserted as class "FinancialInstrument". Under
this type there are two defined sub-classes (see screenshot 1 below).
The inferred subclass "Bond" is declared as equivalent to "maturityDate some
xsd:dateTime", which says that if there is an individual that has a
"maturityDate" declare it as a "Bond" (see screenshot 2).
The "BondOnAMarket" class underneth is equivalent to "(marketCapitalization
some xsd:integer)
 and (maturityDate some xsd:dateTime)". i.e. next to the "maturityDate" i
want an individual to have a "marketCap" in order to be classified as
"BondOnAMarket" (see screenshot 3).
So far so good.
3 Indivduals have a "maturityDate" (Bond_1, Bond_2, BondOnAMarket_1),
therefore  i would expect them to appear under "Bond", but only two of them
appear under Bond. The one that has a "marketCapitalization" next to the
"maturityDate" (BondOnAMarket_1) does not appear under "Bond", it only
appears under "BondOnAMarket". This is not what i would expect. Funny enough
if i remove the "BondOnAMarket" class it actually does appear under "Bond".

Is this an intended behavior, or is my thinking on how i should design the
ontology wrong?

Kind Regards,
Lukas




screenshot 1:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-17-27.png>
screenshot 2:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-45-55.png>
screenshot 3:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-46-20.png>



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Individuals in Class Hierarchies Question

Michael DeBellis-2
Lukas, screen shots are great for debugging but FYI you can also just attach the ontology if it's not too big, that makes it a lot easier (at least for me) to figure out what is going on. I just gave this a quick look but to summarize: I think the ontology is designed correctly and you are getting the appropriate behavior just not interpreting it quite right. 

What I think is happening is the following: the reasoner always asserts that any individual is an instance of the most specific class it can find. So for example if I have classes like Animal>Mammal>Dog   and I give the reasoner enough info to deduce that Fido is a Dog Fido will show up as an instance of Dog but not as Mammal or Animal. But it is implicit that ANYTHING that is a Dog is also a Mammal and an Animal as well. Think of it as set theory, if A is a subset of B and if x is in the set A then x is by definition in the set B as well. 

It would be redundant to show all the instances of the subclass of a class (e.g., the class Thing would have EVERY individual in the ontology listed under it) along with the specific instances of that class itself. It would also be confusing as one might see Fido listed under Mammal and not realize that Fido is also a Dog but when one sees Fido under Dog we already know that Fido is also a Mammal since Dog is a subclass of Mammal. 

Michael

On Thu, Jul 19, 2018 at 8:51 AM, Lukas Maag <[hidden email]> wrote:
Hello
I have 4 individuals that are asserted as class "FinancialInstrument". Under
this type there are two defined sub-classes (see screenshot 1 below).
The inferred subclass "Bond" is declared as equivalent to "maturityDate some
xsd:dateTime", which says that if there is an individual that has a
"maturityDate" declare it as a "Bond" (see screenshot 2).
The "BondOnAMarket" class underneth is equivalent to "(marketCapitalization
some xsd:integer)
 and (maturityDate some xsd:dateTime)". i.e. next to the "maturityDate" i
want an individual to have a "marketCap" in order to be classified as
"BondOnAMarket" (see screenshot 3).
So far so good.
3 Indivduals have a "maturityDate" (Bond_1, Bond_2, BondOnAMarket_1),
therefore  i would expect them to appear under "Bond", but only two of them
appear under Bond. The one that has a "marketCapitalization" next to the
"maturityDate" (BondOnAMarket_1) does not appear under "Bond", it only
appears under "BondOnAMarket". This is not what i would expect. Funny enough
if i remove the "BondOnAMarket" class it actually does appear under "Bond".

Is this an intended behavior, or is my thinking on how i should design the
ontology wrong?

Kind Regards,
Lukas




screenshot 1:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-17-27.png>
screenshot 2:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-45-55.png>
screenshot 3:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-46-20.png>



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
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: Individuals in Class Hierarchies Question

Lukas Maag
Hi Micheal

thanks for the prompt answer! It makes sense not to show all individuals on
a higher level class, nevertheless i can think of specific use cases where
you exactly want that in one way or another. As well e.g.  Sparklis
<http://www.irisa.fr/LIS/ferre/sparklis/>   has bit an "everything"
approach. I think its a representation variation that protege has decided to
to in that way because of the mentioned. Probably something could be done
with a query like SPARQL.

Kind Regard,
Lukas

Btw. the ontology mentioned attached:

MaturityDateBondDemo.owl
<http://protege-project.136.n4.nabble.com/file/t376879/MaturityDateBondDemo.owl>  



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Individuals in Class Hierarchies Question

Michael DeBellis-2
Lukas, FYI, the ontology you included has an error so you won't be getting proper classification. When I run my reasoner (Pellet, but I think you will get the same result with any reasoner) I get an error message because the values for the maturityDate property are not the correct format. The declared range for the property is xsd:Date but the values are formatted as xsd:dateTime. I changed the range to xsd:dateTime and the classifier was able to run with no errors. Note that if you make this change you also need to change the definition for Bond to reflect the new data type or Bond will get classified as a subclass of Nothing which means no individual can be an instance of Bond. FYI, it's a good idea to run the classifier often because you will find errors that way and the sooner you find an error the easier it is to fix. The classifier will give you the option to provide an explanation for why things are inconsistent and usually those explanations are pretty intuitive and bring you right to the problem. I've included the updated ontology. 

Also, I wanted to make the point that this is simply a UI decision in Protege and not anything more.  You could see this if you bring up the DL Query tab and then enter Bond in the "Query (class expression)" window and hit the Execute button (making sure the "Instances" box is checked). You will see that all three Bonds show up as instances of Bond including the instance of BondOnAMarket. 

IMO the Protege UI makes the most sense for most use cases for the reason I mentioned before, the UI would be very cluttered otherwise. Also, it's easier to spot things that don't get classified the way you expect them to. In the main ontology that I work with there aren't supposed to be any instances of Thing so when I see instances of Thing I know I need to check those individuals. But it's just a UI decision and with the DL Query tab you can see all the instances of a class and it's subclasses if you want to. 

Michael

On Thu, Jul 19, 2018 at 9:57 AM, Lukas Maag <[hidden email]> wrote:
Hi Micheal

thanks for the prompt answer! It makes sense not to show all individuals on
a higher level class, nevertheless i can think of specific use cases where
you exactly want that in one way or another. As well e.g.  Sparklis
<http://www.irisa.fr/LIS/ferre/sparklis/>   has bit an "everything"
approach. I think its a representation variation that protege has decided to
to in that way because of the mentioned. Probably something could be done
with a query like SPARQL.

Kind Regard,
Lukas

Btw. the ontology mentioned attached:

MaturityDateBondDemo.owl
<http://protege-project.136.n4.nabble.com/file/t376879/MaturityDateBondDemo.owl


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

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

Re: Individuals in Class Hierarchies Question

Lorenz Buehmann
In reply to this post by Michael DeBellis-2

Hi,


What I think is happening is the following: the reasoner always asserts that any individual is an instance of the most specific class it can find. So for example if I have classes like Animal>Mammal>Dog   and I give the reasoner enough info to deduce that Fido is a Dog Fido will show up as an instance of Dog but not as Mammal or Animal. But it is implicit that ANYTHING that is a Dog is also a Mammal and an Animal as well. Think of it as set theory, if A is a subset of B and if x is in the set A then x is by definition in the set B as well.
I don't agree here - technically and formally, an OWL reasoner computes a set of classes the individual belongs to. It's just a matter of the UI resp. Protege here and was already discussed -> showing all individuals in super classes could make the UI non-responsive for large A-Boxes


Cheers,
Lorenz

It would be redundant to show all the instances of the subclass of a class (e.g., the class Thing would have EVERY individual in the ontology listed under it) along with the specific instances of that class itself. It would also be confusing as one might see Fido listed under Mammal and not realize that Fido is also a Dog but when one sees Fido under Dog we already know that Fido is also a Mammal since Dog is a subclass of Mammal. 

Michael

On Thu, Jul 19, 2018 at 8:51 AM, Lukas Maag <[hidden email]> wrote:
Hello
I have 4 individuals that are asserted as class "FinancialInstrument". Under
this type there are two defined sub-classes (see screenshot 1 below).
The inferred subclass "Bond" is declared as equivalent to "maturityDate some
xsd:dateTime", which says that if there is an individual that has a
"maturityDate" declare it as a "Bond" (see screenshot 2).
The "BondOnAMarket" class underneth is equivalent to "(marketCapitalization
some xsd:integer)
 and (maturityDate some xsd:dateTime)". i.e. next to the "maturityDate" i
want an individual to have a "marketCap" in order to be classified as
"BondOnAMarket" (see screenshot 3).
So far so good.
3 Indivduals have a "maturityDate" (Bond_1, Bond_2, BondOnAMarket_1),
therefore  i would expect them to appear under "Bond", but only two of them
appear under Bond. The one that has a "marketCapitalization" next to the
"maturityDate" (BondOnAMarket_1) does not appear under "Bond", it only
appears under "BondOnAMarket". This is not what i would expect. Funny enough
if i remove the "BondOnAMarket" class it actually does appear under "Bond".

Is this an intended behavior, or is my thinking on how i should design the
ontology wrong?

Kind Regards,
Lukas




screenshot 1:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-17-27.png>
screenshot 2:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-45-55.png>
screenshot 3:
<http://protege-project.136.n4.nabble.com/file/t376879/Screenshot_from_2018-07-19_17-46-20.png>



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
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


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

Re: Individuals in Class Hierarchies Question

Lukas Maag
In reply to this post by Michael DeBellis-2
Hi Michael

thanks for the explanations! I actually do run the reasoner as often as i
can, the reason i didn't spot the inconsistency was because i used HermiT
(1.3.8.413 to be precise). And guess what, he doesn't complain on this one!

Wrt to the UI thing i totally agree!

Kind Regards,
Lukas




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user