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

the package predict result #56

Open
cfkstat opened this issue May 4, 2024 · 1 comment
Open

the package predict result #56

cfkstat opened this issue May 4, 2024 · 1 comment

Comments

@cfkstat
Copy link

cfkstat commented May 4, 2024

The predicted result of PMML is different from the structure given by the package. The value accuracy of node nodes of each tree is more different than that of PMML. How to correct the result。

								<Node score="0.6310734991952227">
									<True/>
									<Node score="0.4361420248951856">
										<SimplePredicate field="x8" operator="greaterThan" value="0.050035"/>
										<Node score="0.2931922770751584">
											<SimplePredicate field="x21" operator="greaterThan" value="15.870000000000003"/>
											<Node score="0.20872197154514233">
												<SimplePredicate field="x2" operator="greaterThan" value="17.565"/>
											</Node>
										</Node>
									</Node>
									<Node score="0.4198977353701825">
										<SimplePredicate field="x21" operator="greaterThan" value="16.715000000000007"/>
									</Node>
									<Node score="0.5677207700477106">
										<SimplePredicate field="x14" operator="greaterThan" value="31.285"/>
									</Node>
									<Node score="0.6109615216880759">
										<SimplePredicate field="x22" operator="greaterThan" value="32.175000000000004"/>
									</Node>
									<Node score="0.6310734991952227">
										<SimplePredicate field="x1" operator="greaterThan" value="12.465000000000002"/>
									</Node>

sklearn pmml model

@iamDecode
Copy link
Owner

Hmm, a likely source of trouble is a mismatch between "<" and "<=" between the model you exported, the pmml file, and sklearn-pmml-model.. However, it is difficult to tell from your example. I do not fully understand how the provided image shows the problem.

Would you be able to provide a more complete example: 1) a code snippet with training the original model, 2) the full pmml file, and optionally 3) a code example showing that the prediction is indeed different between the original model and the pmml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants