Skip to content

XGBoost exported to C generates wrong indices for input array #584

Description

@vladBaciu

As the title says, seems that there is an issue when generating a XGBoost to C:

For instance f100 should have been just 100, otherwise the compilation fails.

void predict(double * input, double * output) {
    double var0;
    if ((input[f100]) >= (0.9064144)) {
        if ((input[f116]) >= (1.9821854)) {
            if ((input[f17]) >= (0.3522055)) {
                if ((input[f1]) >= (0.96535176)) {
                    var0 = 0.04736842;
                } else {
                    var0 = -0.17782988;
                }
            } else {
                var0 = 0.5538461;
            }
        } else {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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