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

Results dont match #574

Open
ghost opened this issue Feb 24, 2023 · 0 comments
Open

Results dont match #574

ghost opened this issue Feb 24, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2023

I have a problem, that my results in c (using export_to_c) do not match with the model.predict_proba.
I checked the gxbooster if-else dump and realized, that m2cgen is not using all depth levels.

Exported tree:

  if (input[1] >= 0.9447428) {
      var0 = 0.22857143; // this looks like a summarized value
  } else {
      var0 = -0.23809524;
  }

xgboost tree:

6:[f1<0.944742799] yes=13,no=14,missing=13
	13:[f3<0.963606358] yes=25,no=26,missing=25
		25:[f4<0.260004044] yes=43,no=44,missing=43
			43:leaf=-0.636363626
			44:leaf=-0
		26:[f3<1.04691052] yes=45,no=46,missing=45
			45:leaf=0.333333343
			46:leaf=-0.230769232
	14:[f4<-0.134770975] yes=27,no=28,missing=27 //<---------- this whole branch is summarized in the export as -0.238
		27:leaf=-0.5
		28:[f3<0.865021944] yes=47,no=48,missing=47
			47:leaf=-0
			48:leaf=0.416666657

Maybe I misunderstand something - -but this does not look right. :)

Can anyone advice please?

Thanks alot!

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

0 participants