Tuesday, September 13, 2016

I have an idea...

I have an idea how to improve Perkun. Do you recall the last example (the medical one)? Perkun creates "visible_states" (a kind of objects in the memory) for all combinations of the input variable values. Each visible state can cost a substantial amount of memory. I realized that it is not important to differentiate between the visible states:

{patient_is_alive=>false,complaints_1=>false,complaints_2=>false,...}
{patient_is_alive=>false,complaints_1=>true,complaints_2=>false,...}
{patient_is_alive=>false,complaints_1=>false,complaints_2=>true,...}
{patient_is_alive=>false,complaints_1=>true,complaints_2=>true,...}


It is not necessary, because the patient is dead. On the other hand it may be very important to do it when the patient is alive:

{patient_is_alive=>true,complaints_1=>false,complaints_2=>false,...}
{patient_is_alive=>true,complaints_1=>true,complaints_2=>false,...}
{patient_is_alive=>true,complaints_1=>false,complaints_2=>true,...}
{patient_is_alive=>true,complaints_1=>true,complaints_2=>true,...}

So there is a certain asymmetry in the importance of the variables. I can imagine that for some diseases it makes no difference whether the blood pressure is low or average, but the high blood pressure is dangerous. So it is too much to say that the blood pressure is not important in this case, but it could be said that two classes matter: {low,average} and {high}. I call them classes per analogy to the equivalence classes in algebra.

Maybe using the knowledge (what is important and what is not) I could save a lot of memory. This would allow my medical example to grow to more realistic proportions. Say, hundreds of variables.

I do not have a software which would allow optimization using my algorithm with this improvement - ignoring unimportant variables (in some cases). I think I will try to write it, first in C++, then possibly port it to Java.

My primary languages are C++ and Perl (I know also Python), but I think that for the project usability it is better to have it as a compiled library (like in C++ or Java).

No comments:

Post a Comment