How to query using individuals using DL Query?

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

How to query using individuals using DL Query?

Boyce
Hi,

I am trying to infer that a patient has asthma.

My definition of asthma is very simple:  hasClinicalObservation some Wheezing

I have created patient1 that has the object properties:  hasDisease some disease and hasClinicalObservation some Wheezing

When I type in the DL Query:  hasDisease Asthma

I do not get patient1 as an individual instance showing up.

Does anyone know why?

Class hierarchy:

patient

disease
   asthma

ClinicalObservation
   wheezing

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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Thomas Schneider-5

On 4 Feb 2010, at 06:15, pufftissue wrote:

> Hi,
>
> I am trying to infer that a patient has asthma.
>
> My definition of asthma is very simple:  hasClinicalObservation some  
> Wheezing

How did you do this? Via "subClassOf" or "equivalentClasses"? In the  
former case, you won't get the inference because you would only have  
said "everything that is asthma has wheezing as clinical observation",  
but the opposite does not need to hold. In the former cases, both  
directions are there.

Thomas

>
> I have created patient1 that has the object properties:  hasDisease  
> some disease and hasClinicalObservation some Wheezing
>
> When I type in the DL Query:  hasDisease Asthma
>
> I do not get patient1 as an individual instance showing up.
>
> Does anyone know why?
>
> Class hierarchy:
>
> patient
>
> disease
>    asthma
>
> ClinicalObservation
>    wheezing
>
> Thanks! _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
+----------------------------------------------------------------------+
|  Dr Thomas Schneider                    schneider (at) cs.man.ac.uk  |
|  School of Computer Science       http://www.cs.man.ac.uk/~schneidt  |
|  Kilburn Building, Room 2.114                 phone +44 161 2756136  |
|  University of Manchester                                            |
|  Oxford Road                                             _///_       |
|  Manchester M13 9PL                                      (o~o)       |
+-----------------------------------------------------oOOO--(_)--OOOo--+

Dinder (vb.)
   To nod thoughtfully while someone gives you a long and complex set of
   directions which you know you're never going to remember.

                   Douglas Adams, John Lloyd: The Deeper Meaning of Liff







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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

PGP.sig (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Boyce

Hi Thomas,
I used equivalent classes but I am kind of confused. Can I try again?  I'm
hoping to query <hasDisease Asthma> and hoping that Kevin (an individual) shows
up in the search results of DL Query.

My defined class for asthma is just <Disease
and hasClinicalObservation some Wheezing>

I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  3.
<hasClinicalObservation some Wheezing>

Asthma is a subclass of Disease, so is there a way for Fact++ to infer that
Kevin has the disease asthma?

Thank you very much!



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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Thomas Russ

On Feb 4, 2010, at 10:55 AM, R wrote:

>
> Hi Thomas,
> I used equivalent classes but I am kind of confused. Can I try  
> again?  I'm
> hoping to query <hasDisease Asthma> and hoping that Kevin (an  
> individual) shows
> up in the search results of DL Query.
>
> My defined class for asthma is just <Disease
> and hasClinicalObservation some Wheezing>
>
> I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  3.
> <hasClinicalObservation some Wheezing>

I don't quite follow what you mean by item 2.  It doesn't look like a  
type restriction or class expression.  I will assume you mean  
<hasDisease some Disease>.  Otherwise you are getting into a situation  
where you are mixing (confusing?) classes and individuals.

> Asthma is a subclass of Disease, so is there a way for Fact++ to  
> infer that
> Kevin has the disease asthma?

Well, the classification will be to identify what CLASS the individual  
belongs to.
So what you really want is to have the reasoner infer that the  
(unnamed) disease that Kevin has belongs to the class Asthma.

So, assuming the following:

(1)  Your Definition of Asthma is an equivalent class (necessary &  
sufficient) definition
(2)  You change your information about kevin's item 3 to do one of the  
following:
      (a)  - Create a new instance of disease (call it disease-001)
           - Assert "Kevin hasDisease disease-001"
           - Assert "disease-001 rdf:type (hasClinicalObservation some  
Wheezing)"
      (b)  - hasDisease (hasClinicalObservation some Wheezing)

This should then give you what you expect.  In the case of option (a)  
you will find that disease-001 is classified as Asthma. In the case of  
(b) you will find that Kevin will be a subclass of (hasDisease some  
Asthma).

[I'll also add my usual warning that you won't be able to build a  
really robust diagnosis system using this method, because the type of  
reasoning done by the classifier, namely deduction is not the type of  
reasoning you need for diagnosis.  Instead you will need abductive  
reasoning, which requires a different type of reasoner.]


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Boyce
Thanks alot, Thomas!

On Thu, Feb 4, 2010 at 2:28 PM, Thomas Russ <[hidden email]> wrote:

On Feb 4, 2010, at 10:55 AM, R wrote:


Hi Thomas,
I used equivalent classes but I am kind of confused. Can I try again?  I'm
hoping to query <hasDisease Asthma> and hoping that Kevin (an individual) shows
up in the search results of DL Query.

My defined class for asthma is just <Disease
and hasClinicalObservation some Wheezing>

I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  3.
<hasClinicalObservation some Wheezing>

I don't quite follow what you mean by item 2.  It doesn't look like a type restriction or class expression.  I will assume you mean <hasDisease some Disease>.  Otherwise you are getting into a situation where you are mixing (confusing?) classes and individuals.

Asthma is a subclass of Disease, so is there a way for Fact++ to infer that
Kevin has the disease asthma?

Well, the classification will be to identify what CLASS the individual belongs to.
So what you really want is to have the reasoner infer that the (unnamed) disease that Kevin has belongs to the class Asthma.

So, assuming the following:

(1)  Your Definition of Asthma is an equivalent class (necessary & sufficient) definition
(2)  You change your information about kevin's item 3 to do one of the following:
    (a)  - Create a new instance of disease (call it disease-001)
         - Assert "Kevin hasDisease disease-001"
         - Assert "disease-001 rdf:type (hasClinicalObservation some Wheezing)"
    (b)  - hasDisease (hasClinicalObservation some Wheezing)

This should then give you what you expect.  In the case of option (a) you will find that disease-001 is classified as Asthma. In the case of (b) you will find that Kevin will be a subclass of (hasDisease some Asthma).

[I'll also add my usual warning that you won't be able to build a really robust diagnosis system using this method, because the type of reasoning done by the classifier, namely deduction is not the type of reasoning you need for diagnosis.  Instead you will need abductive reasoning, which requires a different type of reasoner.]


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Rajverma

Hi,

 

I’m not sure if I should ask this question here, or in Protégé4 mailing list… is it possible to use DL queries (the way they work in P4) programmatically in my application where I use OWL ontologies? if so which libraries/classes to use, and where can I get them from!? Is there any detailed info mentioned anywhere regarding this?

 

Thankyou,

Raj

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of pufftissue
Sent: Donnerstag, 4. Februar 2010 20:52
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] How to query using individuals using DL Query?

 

Thanks alot, Thomas!

On Thu, Feb 4, 2010 at 2:28 PM, Thomas Russ <[hidden email]> wrote:


On Feb 4, 2010, at 10:55 AM, R wrote:


Hi Thomas,
I used equivalent classes but I am kind of confused. Can I try again?  I'm
hoping to query <hasDisease Asthma> and hoping that Kevin (an individual) shows
up in the search results of DL Query.

My defined class for asthma is just <Disease
and hasClinicalObservation some Wheezing>

I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  3.
<hasClinicalObservation some Wheezing>


I don't quite follow what you mean by item 2.  It doesn't look like a type restriction or class expression.  I will assume you mean <hasDisease some Disease>.  Otherwise you are getting into a situation where you are mixing (confusing?) classes and individuals.

Asthma is a subclass of Disease, so is there a way for Fact++ to infer that
Kevin has the disease asthma?


Well, the classification will be to identify what CLASS the individual belongs to.
So what you really want is to have the reasoner infer that the (unnamed) disease that Kevin has belongs to the class Asthma.

So, assuming the following:

(1)  Your Definition of Asthma is an equivalent class (necessary & sufficient) definition
(2)  You change your information about kevin's item 3 to do one of the following:
    (a)  - Create a new instance of disease (call it disease-001)
         - Assert "Kevin hasDisease disease-001"
         - Assert "disease-001 rdf:type (hasClinicalObservation some Wheezing)"
    (b)  - hasDisease (hasClinicalObservation some Wheezing)

This should then give you what you expect.  In the case of option (a) you will find that disease-001 is classified as Asthma. In the case of (b) you will find that Kevin will be a subclass of (hasDisease some Asthma).

[I'll also add my usual warning that you won't be able to build a really robust diagnosis system using this method, because the type of reasoning done by the classifier, namely deduction is not the type of reasoning you need for diagnosis.  Instead you will need abductive reasoning, which requires a different type of reasoner.]


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

 


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Thomas Schneider-5
Hi Raj,

you will need to instantiate a reasoner and ask it for superclasses,  
subclasses, members etc. Examples can be found at [1], particularly  
number 8. More info is available in the javadoc of the interface  
OWLReasoner.

Cheers

Thomas

[1] http://owlapi.sourceforge.net/documentation.html

On 5 Feb 2010, at 12:31, Mudunuri, Venkata Rajashekar Varma wrote:

> Hi,
>
> I’m not sure if I should ask this question here, or in Protégé4  
> mailing list… is it possible to use DL queries (the way they work in  
> P4) programmatically in my application where I use OWL ontologies?  
> if so which libraries/classes to use, and where can I get them  
> from!? Is there any detailed info mentioned anywhere regarding this?
>
> Thankyou,
> Raj
>
>
> From: [hidden email] [mailto:[hidden email]
> ] On Behalf Of pufftissue
> Sent: Donnerstag, 4. Februar 2010 20:52
> To: User support for the Protege-OWL editor
> Subject: Re: [protege-owl] How to query using individuals using DL  
> Query?
>
> Thanks alot, Thomas!
>
> On Thu, Feb 4, 2010 at 2:28 PM, Thomas Russ <[hidden email]> wrote:
>
> On Feb 4, 2010, at 10:55 AM, R wrote:
>
>
> Hi Thomas,
> I used equivalent classes but I am kind of confused. Can I try  
> again?  I'm
> hoping to query <hasDisease Asthma> and hoping that Kevin (an  
> individual) shows
> up in the search results of DL Query.
>
> My defined class for asthma is just <Disease
> and hasClinicalObservation some Wheezing>
>
> I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  3.
> <hasClinicalObservation some Wheezing>
>
> I don't quite follow what you mean by item 2.  It doesn't look like  
> a type restriction or class expression.  I will assume you mean  
> <hasDisease some Disease>.  Otherwise you are getting into a  
> situation where you are mixing (confusing?) classes and individuals.
>
> Asthma is a subclass of Disease, so is there a way for Fact++ to  
> infer that
> Kevin has the disease asthma?
>
> Well, the classification will be to identify what CLASS the  
> individual belongs to.
> So what you really want is to have the reasoner infer that the  
> (unnamed) disease that Kevin has belongs to the class Asthma.
>
> So, assuming the following:
>
> (1)  Your Definition of Asthma is an equivalent class (necessary &  
> sufficient) definition
> (2)  You change your information about kevin's item 3 to do one of  
> the following:
>     (a)  - Create a new instance of disease (call it disease-001)
>          - Assert "Kevin hasDisease disease-001"
>          - Assert "disease-001 rdf:type (hasClinicalObservation some  
> Wheezing)"
>     (b)  - hasDisease (hasClinicalObservation some Wheezing)
>
> This should then give you what you expect.  In the case of option  
> (a) you will find that disease-001 is classified as Asthma. In the  
> case of (b) you will find that Kevin will be a subclass of  
> (hasDisease some Asthma).
>
> [I'll also add my usual warning that you won't be able to build a  
> really robust diagnosis system using this method, because the type  
> of reasoning done by the classifier, namely deduction is not the  
> type of reasoning you need for diagnosis.  Instead you will need  
> abductive reasoning, which requires a different type of reasoner.]
>
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
+----------------------------------------------------------------------+
|  Dr Thomas Schneider                    schneider (at) cs.man.ac.uk  |
|  School of Computer Science       http://www.cs.man.ac.uk/~schneidt  |
|  Kilburn Building, Room 2.114                 phone +44 161 2756136  |
|  University of Manchester                                            |
|  Oxford Road                                             _///_       |
|  Manchester M13 9PL                                      (o~o)       |
+-----------------------------------------------------oOOO--(_)--OOOo--+

Dinder (vb.)
   To nod thoughtfully while someone gives you a long and complex set of
   directions which you know you're never going to remember.

                   Douglas Adams, John Lloyd: The Deeper Meaning of Liff







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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

PGP.sig (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to query using individuals using DL Query?

Thomas Russ
In reply to this post by Thomas Russ

On Feb 4, 2010, at 11:28 AM, Thomas Russ wrote:

>
> On Feb 4, 2010, at 10:55 AM, R wrote:
>
>>
>> Hi Thomas,
>> I used equivalent classes but I am kind of confused. Can I try  
>> again?  I'm
>> hoping to query <hasDisease Asthma> and hoping that Kevin (an  
>> individual) shows
>> up in the search results of DL Query.
>>
>> My defined class for asthma is just <Disease
>> and hasClinicalObservation some Wheezing>
>>
>> I've defined Kevin to be a 1.  a patient  2.  <hasDisease Disease>  
>> 3.
>> <hasClinicalObservation some Wheezing>
>
> I don't quite follow what you mean by item 2.  It doesn't look like  
> a type restriction or class expression.  I will assume you mean  
> <hasDisease some Disease>.  Otherwise you are getting into a  
> situation where you are mixing (confusing?) classes and individuals.
>
>> Asthma is a subclass of Disease, so is there a way for Fact++ to  
>> infer that
>> Kevin has the disease asthma?
>
> Well, the classification will be to identify what CLASS the  
> individual belongs to.
> So what you really want is to have the reasoner infer that the  
> (unnamed) disease that Kevin has belongs to the class Asthma.
>
> So, assuming the following:
>
> (1)  Your Definition of Asthma is an equivalent class (necessary &  
> sufficient) definition
> (2)  You change your information about kevin's item 3 to do one of  
> the following:
>     (a)  - Create a new instance of disease (call it disease-001)
>          - Assert "Kevin hasDisease disease-001"
>          - Assert "disease-001 rdf:type (hasClinicalObservation some  
> Wheezing)"
>     (b)  - hasDisease (hasClinicalObservation some Wheezing)

                        ^
                      some

>
> This should then give you what you expect.  In the case of option  
> (a) you will find that disease-001 is classified as Asthma. In the  
> case of (b) you will find that Kevin will be a subclass of  
> (hasDisease some Asthma).
>
> [I'll also add my usual warning that you won't be able to build a  
> really robust diagnosis system using this method, because the type  
> of reasoning done by the classifier, namely deduction is not the  
> type of reasoning you need for diagnosis.  Instead you will need  
> abductive reasoning, which requires a different type of reasoner.]
>
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03