mltk
mltk copied to clipboard
GAM plots with nominal interaction terms
It seems to me that there is a bug in Visualizer
when one of the interaction terms is not of type BinnedAttribute
, because at line 251 there is a cast Bins bins1 = ((BinnedAttribute) f1).getBins();
without a previous type test. This is weird because some tests are made before to handle NominalAttributes
, but the end of the code seems to run only on BinnedAttributes
(in particular it need boundaries which are only defined for bins..).
The code was initially designed to support both BinnedAttribute and NominalAttribute, but at some point I was focusing on BinnedAttribute. I will fix that in the next iteration. Thanks for point that out!
I tried to fix it, and was able to do it when both are discrete but couldn't do what I wanted with gnuplot when one is discrete and one is continuous. So I actually decided to use ggplot in R, and to call my R scripts from Java. If you're interested you can see what I did on my fork (check the branch selectFeatures
).
Here is an example of the new plots: