Fuzzy logic for expert medical system (probability of having a patient's covid)

MrAlex

New member
Joined
Feb 10, 2024
Messages
1
Hello, I'm trying to devol a program that gives me a probability of having a patient's covid, using fuzzy logic. The calculation is based on the patient's number of symptoms, the number of positive people with whom the patient has had close contact and the number of positive people with whom the patient has had non-close contact.
If for examaple he has 3 symptoms, 1 close contancts (who is positive ) and 2 non close contacts (who are positive), how can I use a fuzzy logic? I tried to do this, but I don't think is correct, also cuz I get values > 1:

- get probability of have covid based on symptoms: where X is number of symptoms and Y the probability of having covid based on sym
( X in 0..0 -> Y is 0 ;
X in 1..1 -> Y is 0.2 ;
X in 2..2 -> Y is 0.40;
X >= 3 -> Y is 0.50 ).
- I did the same for close contacts:
(X in 0..0 -> Y is 0 ;
X in 1..1 -> Y is 0.4 ;
X in 2..2 -> Y is 0.60;
X >= 3 -> Y is 0.8 )
- And the same for non_close contacts:
( X in 0..0 -> Y is 0 ;
X in 1..2 -> Y is 0.3 ;
X >= 3 -> Y is 0.4 )

At the end, I calculed a medium like this:
Sum is S + C + C1 (where S,C and C1 are respectively the Y of symp,close contacts and non close).

Then Prob is ((NumberOfSymptoms * S ) + (NumberOfCloseContacts * C) + (NumberOfNonCloseContacts * C1)) / Sum
Ofc it doesn't give me what I want, for exapmple if the patient has 2 symp and 1 close contact and 0 non close contacts, it give me something > 1. How can I fix this and apply a fuzzy logic in a correct way?
 
Top