Skip to content

Wilkinson formula term sorting does not match MATLAB left-to-right hierarchy #395

@Pasta-coder

Description

@Pasta-coder

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions