Sunday, September 11, 2016

Perkun - a medical example.

Perkun is highly experimental and it is NOT suitable for games with two players. What is it good for? I thought I would come up with a simple example demonstrating how Perkun might be used in medicine. I have no medical background, I am just a programmer, so the example will be really simple:

    value wait;
    value false, true;
    value none, low, average, high;
    value treatment_a,treatment_b,treatment_c;
    value test_1,test_2,test_3,test_4, test_5;

    input variable patient_is_alive:{false,true};
    input variable complaints_1:{false,true};
    input variable complaints_2:{false,true};
    input variable test_result:{none, low,average,high};
    hidden variable disease_1:{false,true}, disease_2:{false,true}, disease_3:{false,true};
    hidden variable body_parameter_1:{low,average,high};
    hidden variable body_parameter_2:{low,average,high};   
    output variable action:{wait, treatment_a,treatment_b,treatment_c, test_1,test_2,test_3,test_4, test_5};

We have a patient (the input variable patient_is_alive is the only thing that matters, i.e. affects our payoff). Then we have complaints (only two) - the input variables that we immediately get from our patient. The last input variable is a test_result. Note that we have five different tests and we use the same input variable for their result. I assume we get the result immediately after applying the test.

There are three hidden variables for three different diseases and in addition two hidden variables - body parameters. In real life I imagine there would be thousands of body parameters (which probably makes my implementation unusable). But I am just introducing the idea. The patient is an automaton which can be controlled either with treatments or with tests. See the output variable ("action"). It contains both the treatments and tests. From the Perkun point of view there is no difference between a treatment and an experiment (test). They can be applied interchangeably. Important is, it always updates the belief with the newly acquired knowledge.

There is one more drawback - I would expect that the Perkun user inherits the class perkun::optimizer_with_all_data and provides his own implementation of the method void set_apriori_belief(perkun::belief * b) const. It is necessary to provide actual numbers for the first belief. At present for any disease Perkun would assume 50% true and 50% false, which is not the case in nature.

So what is the difference between Perkun and a normal bayesian classifier? It is the application of hidden variables and the algorithm that plans updating the belief depending on the experiments/tests results. The algorithm that plans using tests and treatments interchangeably, just to keep the expected value of the payoff maximal. Perkun is not a diagnostic system, it is an optimization system. It is not trying to minimize the entropy of the belief distribution. Its only objective is to maximize the payoff. So it is perfectly happy with leaving some unknown knowledge unknown.

No comments:

Post a Comment