Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vladBaciu opened this issue Sep 29, 2023 · 0 comments
Open

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

vladBaciu opened this issue Sep 29, 2023 · 0 comments

Comments

@vladBaciu
Copy link

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 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant