Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] equivalent class and N-ary Relations

Timothy Redmond tredmond at stanford.edu
Wed Feb 22 10:51:03 PST 2012


I have attached a sample ontology that I think captures some of what you 
want.  There are some closed world issues that you have to be a bit 
careful of so I will explain them a bit.

> Let me state the problem in a different way.
> I'll state the problem in a bottom-up manner in plain language, given 
> two classes: Fever and Disease

I have made these two classes disjoint because otherwise it is possible 
that when a diagnosis indicates a fever, the same diagnosis is also 
indicating a disease.

> There are patients (as individuals) in the ontology who might have:
>
>   * only Fever with its given probability
>

To do this you need to state that you have a Fever diagnosis and that 
this is the only diagnosis that you have.  I have stated this with the 
following axioms:

    Class: Minor_Patient

         EquivalentTo:
             Patient
              and (has_diagnosis some Fever_Relation_80)
              and (has_diagnosis only Fever_Relation_80)


>   * Fever with its given probability *accompanied with* a Disease with
>     its given probability.
>

I tried to capture this in the following axioms:

    Class: Serious_Patient

         EquivalentTo:
             Patient
              and (has_diagnosis some Disease_Relation_70)
              and (has_diagnosis some Fever_Relation_30)


>
> A critical example would be an individual X. X has a Disease with 
> probability of 90 along with Fever with probability of 80. Since X has 
> both Fever and Disease together satisfying the individual 
> probabilities (for being serious_patient), X should only be reasoned 
> out as Serious_patient ONLY.

I created an individual called bob:

    Individual: bob

         Annotations:
             rdfs:comment "Bob is feeling pretty sick."@en

         Types:
             has_diagnosis some
                 ((diagnosis_value some Fever)
                  and (diag_prob value 80)),
             has_diagnosis some
                 ((diagnosis_value some Disease)
                  and (diag_prob value 90)),
             Patient


This guy classifies as a serious patient.  It is a bit more tricky to 
create an individual that classifies as a minor patient:

    Individual: davey

         Annotations:
             rdfs:comment "But davey only has a fever."@en

         Types:
             has_diagnosis exactly 1 Relation,
             has_diagnosis some
                 ((diagnosis_value some Fever)
                  and (diag_prob value 90)),
             Patient


The thing to notice here is that I have to explicitly state that davey 
only has one diagnosis.  Otherwise the OWL reasoner will not be sure if 
there could be another diagnosis.  This patient classifies as a minor 
patient.  Closing off the information about a patient is tedious for a 
human, but if this information was automatically generated (e.g. as a 
doctor examined the patient and entered data into a tablet) then a 
computer program could ensure this easily.

Finally you can check in the DLQuery tab that the Minor_Patient and 
Serious_Patient classes are disjoint (I attached the explanation).  To 
make this happen I had to make the diagnosis_value property functional.  
Otherwise a single relation could indicate both a fever and a disease at 
the same time.

-Timothy


On 02/22/2012 02:22 AM, Arnab Sinha wrote:
> Thanks Timothy for the suggestions. But I could'nt figure out a solution.
> Let me state the problem in a different way.
> I'll state the problem in a bottom-up manner in plain language, given 
> two classes: Fever and Disease
> There are patients (as individuals) in the ontology who might have:
>
>   * only Fever with its given probability
>
> OR
>
>   * Fever with its given probability *accompanied with* a Disease with
>     its given probability.
>
> Now these patients needs to be reasoned out as Minor_patients or 
> serious_patients.
>  - Minor_patients are those just having Fever with probability of 80 
> or more.
>  - Serious_patients are those having (Fever with probability of 30 or 
> more) *AND* (a Disease with probability of 70 or more).
>
> A critical example would be an individual X. X has a Disease with 
> probability of 90 along with Fever with probability of 80. Since X has 
> both Fever and Disease together satisfying the individual 
> probabilities (for being serious_patient), X should only be reasoned 
> out as Serious_patient ONLY.
>
> Now regarding the pointers you suggested:
>
> The problem requires all members of Fever_Relation_80 to be member of 
> Fever_Relation_20. So lower bound is sufficient.
>
> I have incorporated the suggestion which I missed out:
>                       Serious_Patient = Patient and has_diagnosis....
> Regarding the third part of your reply, the restatement of the problem 
> above would help to clarify probably.
> Thanks again.
> -Arnab.
>
>
>
> On Tue, Feb 21, 2012 at 3:59 PM, Timothy Redmond 
> <tredmond at stanford.edu <mailto:tredmond at stanford.edu>> wrote:
>
>
>     I don't completely understand your example but it appears that you
>     need to define ranges with both an upper and lower bound.  So if
>     you don't want all members of
>
>         Fever_Relation_80 = (diagnosis_value some Fever) and (diag_prob only xsd:int[>= 80])
>
>
>     to also be members of
>
>         Fever_Relation_20 = (diagnosis_value some Fever) and (diag_prob only xsd:int[>= 20])
>
>
>     then perhaps you want your definitions to have ranges like so:
>
>         Fever_Relation_20 = (diagnosis_value some Fever) and (diag_prob only int[>= 20,<  30])
>
>
>     Another thing that I am noticing about your ontology is that I am
>     not sure that the use of "only" and "some" is right.  For example,
>     the ontology defines a Serious_Patient to be anything that
>
>
>         has_diagnosis only (Diagnosis_Relation_70 and Fever_Relation_30)
>
>
>     This means that any patient with no diagnosis is a Serious_Patient
>     (because they only have these "serious diagnoses").  Actually
>     worse than this, it means that anything that doesn't have a
>     diagnosis is a Serious_Patient.  So a Disease that doesn't have a
>     diagnosis is a serious patient. I think that a better definition is
>
>         Serious_Patient = Patient and has_diagnosis some (Diagnosis_Relation_70 and Fever_Relation_30).
>
>
>     This is to say that to be a Serious_Patient you must have at least
>     one diagnosis that has the serious attributes.
>
>     Finally - I can't tell if this is an issue - there is the point
>     that the expression
>
>         Diagnosis_Relation_70 and Fever_Relation_30
>
>
>     the constraints in the two classes, Diagnosis_Relation_70 and
>     Fever_Relation_30, are both being applied to the same relation. 
>     That is to say that the above class consists of all those
>     relations, x,  that satisfy all of the following:
>
>      1. x has some diagnosis_value in the Disease class,
>      2. x has some diagnosis_value in the Fever class
>      3. x only has diag_prob values that are greater than or equal to 70
>      4. x only has diag_prob values that are greater than or equal to 30.
>
>     I am wondering if you wanted to talk about two different diagnoses
>     here (one of disease and one of Fever) or if there was a single
>     diagnosis and in particular that you wanted the conclusion that
>     the Fever diagnosis also only had diag_prob values that are
>     greater than 70.  Perhaps you wanted to say
>
>         Serious_Patient = Patient and (has_diagnosis some Diagnosis_Relation_70) and (has_diagnosis some Fever_Relation_30).
>
>
>     -Timothy
>
>
>     On 02/20/2012 02:29 AM, Arnab Sinha wrote:
>>     Thanks Tim for the explanation. Yes it help me and confirmed that
>>     it's working the way I wanted. Then the error to my problem lies
>>     elsewhere. Could you please suggest something?
>>     I created few relations by using two basic
>>     relations(Diagnosis_Relation_20 and Fever_Relation_20) by varying
>>     the diag_prob values. Diagnosis_Relation_x is a relation to link
>>     any disease with probablity >=x and Fever_Relation_y is a
>>     relation to link Fever with a probablity >= y. The definition for
>>     the classes with diag_prob>=20 is as follows:
>>
>>     Class: Diagnosis_Relation_20
>>         EquivalentTo:
>>             (diagnosis_value some Disease)
>>              and (diag_prob only xsd:int[>= 20])
>>
>>         SubClassOf:
>>             Relations
>>
>>
>>     Class: Fever_Relation_20
>>         EquivalentTo:
>>             (diagnosis_value some Fever)
>>              and (diag_prob only xsd:int[>= 20])
>>
>>         SubClassOf:
>>             Relations
>>     Next, I defined two classes of patients depending on the disease
>>     they have. Having only Fever>=80 is minor whereas having some
>>     Disease>=70 accompanied with Fever>=30 is considered serious.
>>     Definitions as below:
>>     Class: Minor_Patient
>>         EquivalentTo:
>>             has_diagnosis only Fever_Relation_80
>>
>>
>>     Class: Serious_Patient
>>         EquivalentTo:
>>             has_diagnosis only
>>                 (Diagnosis_Relation_70
>>                  and Fever_Relation_30)
>>     Now the problem is some patients are not being categorized as
>>     required. Fow example, individual Beth is reasoned to be
>>     Serious_Patient correctly but individual John is reasoned to be
>>     both Serious and Minor. How can I avoid John to be reasoned as
>>     Minor_Patient? The definitions of the indiviuals are:
>>     Individual: Beth
>>         Types:
>>             Patients,
>>             has_diagnosis only
>>                 (Diagnosis_Relation_70
>>                  and Fever_Relation_50)
>>
>>     Individual: John
>>         Types:
>>             Patients,
>>             has_diagnosis only
>>                 (Diagnosis_Relation_80
>>                  and Fever_Relation_50)
>>
>>
>>     I'm attaching the ontology to look into. Please let me know where
>>     I'm possibly wrong and suggest me some better workaround if this
>>     is not the correct approach.
>>     Cheers,
>>     - Arnab.
>>
>>     On Thu, Feb 16, 2012 at 9:00 PM,
>>     <protege-owl-request at lists.stanford.edu
>>     <mailto:protege-owl-request at lists.stanford.edu>> wrote:
>>
>>         It sounds like you are talking about something like the attached
>>         ontology.  (I used the Manchester syntax for clarity.)  This
>>         ontology
>>         has two definitions:
>>
>>            Class: Diagnosis_Relation_20
>>
>>                 EquivalentTo:
>>                     (diagnosis_value some Disease)
>>                      and (diag_prob only xsd:int[>= 20])
>>
>>
>>            Class: Diagnosis_Relation_40
>>
>>                 EquivalentTo:
>>                     (diagnosis_value some Disease)
>>                      and (diag_prob only xsd:int[>= 40])
>>
>>
>>
>>         In this case it can be deduced that Diagnosis_Relation_40 is
>>         a subclass
>>         of Diagnosis_Relation_20.
>>
>>         Putting this into English, I would say that
>>         Diagnosis_Relation_40 is the
>>         class containing all individuals that have a diagnosis_value that
>>         belongs to the Disease class and such that all their
>>         diag_prob values
>>         are integers greater than or equal to 40.
>>
>>         Suppose that we have an individual 'i' that is a member of
>>         Diagnosis_Relation_40.  Since the individual 'i' has all its
>>         diag_prob
>>         values greater than or equal to 40, it also follows that all the
>>         diag_prob values for the individual 'i' are also integers
>>         greater than
>>         or equal to 20.  Thus 'i' satisfies the requirements for
>>         belonging to
>>         Diagnosis_Relation_20:  all its dig_prob values are integers
>>         greater
>>         than or equal to 20 and it has some diagnosis_value in the
>>         Disease class.
>>
>>         Does this help?
>>
>>         -Timothy
>>
>>
>>
>>
>>         On 2/16/12 9:29 AM, Arnab Sinha wrote:
>>         > Hi All,
>>         > Here is a situation I would like to present before I put
>>         forward my
>>         > question:
>>         > I tried some minor modifications to the N-ary relations
>>         using "Use
>>         > Case 1" in http://www.w3.org/TR/swbp-n-aryRelations/ . I
>>         required a
>>         > numerical probability value (like int[>= 40]) instead of
>>         discrete
>>         > values (like High, Medium or Low) and so took the
>>         > "diagnosis_probablity" as a data property.
>>         > Now I defined two connecting classes
>>         "Diagnosis_Relation_20" and
>>         > "Diagnosis_Relation_40" as equivalent classes which differs
>>         in the
>>         > minimum probability value. The definition of the class
>>         > Diagnosis_Relation_20 in OWL is as follows:
>>         >
>>         > <owl:Class
>>         >
>>         rdf:about="http://protege.stanford.edu/swbp/diagnosis.owl#Diagnosis_Relation_20">
>>         > <owl:equivalentClass>
>>         > <owl:Class>
>>         > <owl:intersectionOf rdf:parseType="Collection">
>>         > <owl:Restriction>
>>         > <owl:onProperty
>>         >
>>         rdf:resource="http://protege.stanford.edu/swbp/diagnosis.owl#diagnosis_value"/>
>>         > <owl:someValuesFrom
>>         >
>>         rdf:resource="http://protege.stanford.edu/swbp/diagnosis.owl#Disease"/>
>>         > </owl:Restriction>
>>         > <owl:Restriction>
>>         > <owl:onProperty
>>         >
>>         rdf:resource="http://protege.stanford.edu/swbp/diagnosis.owl#diag_prob"/>
>>         > <owl:allValuesFrom>
>>         > <rdfs:Datatype>
>>         > <owl:onDatatype rdf:resource="&xsd;int"/>
>>         > <owl:withRestrictions rdf:parseType="Collection">
>>         > <rdf:Description>
>>         > <xsd:minInclusive
>>         rdf:datatype="&xsd;integer">20</xsd:minInclusive>
>>         > </rdf:Description>
>>         > </owl:withRestrictions>
>>         > </rdfs:Datatype>
>>         > </owl:allValuesFrom>
>>         > </owl:Restriction>
>>         > </owl:intersectionOf>
>>         > </owl:Class>
>>         > </owl:equivalentClass>
>>         > </owl:Class>
>>         >
>>         > Now, invoking the reasoner infers class
>>         Diagnosis_Relation_20 as
>>         > superclass of Diagnosis_Relation_40. I am unable to
>>         understand the
>>         > explanation of this inference. It seems something obvious
>>         but I want
>>         > to get the detailed explanation. If someone can help me
>>         out, it would
>>         > be really nice.
>>         > Have a good day!
>>         >
>>         > Thanks in advance,
>>         > Arnab.
>>
>>
>>
>>     _______________________________________________
>>     protege-owl mailing list
>>     protege-owl at lists.stanford.edu  <mailto:protege-owl at lists.stanford.edu>
>>     https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>>     Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>     _______________________________________________
>     protege-owl mailing list
>     protege-owl at lists.stanford.edu <mailto:protege-owl at lists.stanford.edu>
>     https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>     Instructions for unsubscribing:
>     http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20120222/49a477e5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diagnosis-2.owl
Type: application/rdf+xml
Size: 2773 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20120222/49a477e5/attachment-0001.owl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DisjointExplanation.png
Type: image/png
Size: 41693 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20120222/49a477e5/attachment-0001.png>


More information about the protege-owl mailing list