occam-ra / occam

OCCAM Reconstructability Analysis Tools
Other
20 stars 14 forks source link

Variable cardinality bug #8

Open gdcutting opened 5 years ago

gdcutting commented 5 years ago

Per Marty: "Misleading behavior (basically a bug): Occam allows a user to have a variable with cardinality 1, which leads to strange output. Turn off variables with cardinality 1 and output a notice that says 'Variables with cardinality 1 are not proper variables, so variable has been turned off.'

gdcutting commented 5 years ago

Working on this and have made progress but need to understand the object structure better so it will take a little more time.

gdcutting commented 5 years ago

There is a noUseMask, and the comments indicate that this is to be used for flagging variables that are to be excluded from the model. Setting this in VariableList::checkCardinalities() does not fully exclude variables from the model. Investigating more to see whether the no use thing was actually fully implemented, and how best to do this implementation if it's not.

gdcutting commented 5 years ago

Have spent some time on this but am wary of attempting a fix yet. Long story short, there are a lot of places where the VariableList is used, and the only checking is to see whether the variables are DV's or not (and if not they then are included). So the noUseMask isn't fully implemented, and changes in a lot of places would be required to exclude flagged variables from subsequent calculations. And if one of these was missed, the calculated values would be wrong but it would be very hard to tell. Considered the possibility of creating a delete function to remove variables from the VariableList, but this is non-trivial as well. So I am going to take a look at some other issues that might be easier to fix.