While integrating parseWilkinsonFormula into the ClassificationGAM class to replace its hardcoded formula parsing, a unit test revealed a discrepancy in how formula terms are sorted compared to MATLAB.
When expanding the crossing operator (*), Octave currently sorts the binary schema matrix in ascending order. Because 0 is less than 1, sortrows places variables with later indices before earlier ones.
While integrating
parseWilkinsonFormulainto theClassificationGAMclass to replace its hardcoded formula parsing, a unit test revealed a discrepancy in how formula terms are sorted compared to MATLAB.When expanding the crossing operator (
*), Octave currently sorts the binary schema matrix in ascending order. Because0is less than1,sortrowsplaces variables with later indices before earlier ones.