Code Monkey home page Code Monkey logo

Comments (2)

vruusmann avatar vruusmann commented on August 11, 2024

https://openscoring.io/blog/2019/02/26/jpmml_evaluator_api_tracing_reporting_predictions/

Go to the resources section and download report.py and XGBoostAudit-reporting.pmml files.

Then run report.py using Python interpreter:

$ python3.7 report.py

What do you see?

I see the following (which is the intended result):

{'Age': 38, 'Employment': 'Private', 'Education': 'College', 'Marital': 'Unmarried', 'Occupation': 'Service', 'Income': 81838, 'Gender': 'Female', 'Deductions': False, 'Hours': 72}
{'Adjusted': 0, 'ref(report(xgbValue))': '<math xmlns="http://www.w3.org/1998/Math/MathML"><apply><plus/><cn>-0.17968129</cn><cn>-0.16313718</cn><cn>-0.15570186</cn><cn>-0.14460582</cn><cn>-0.13957009</cn><cn>-0.12399502</cn><cn>-0.12931323</cn><cn>-0.12063908</cn><cn>-0.11913132</cn><cn>-0.11191886</cn><cn>-0.11103699</cn><cn>-0.110534586</cn><cn>-0.101101674</cn><cn>-0.104573585</cn><cn>-0.09484299</cn><cn>-0.095708475</cn><cn>-0.09683787</cn></apply></math>', 'probability(0)': 0.8911293745040894, 'probability(1)': 0.10887060314416885, 'report(probability(0))': '<math xmlns="http://www.w3.org/1998/Math/MathML"><apply><minus/><cn>1</cn><cn>0.1088706</cn></apply></math>', 'report(probability(1))': '<math xmlns="http://www.w3.org/1998/Math/MathML"><apply><apply><inverse/><ci>logit</ci></apply><apply><times/><cn>1.0</cn><cn>-2.1023297</cn></apply></apply></math>'}

from jpmml-evaluator-python.

axemixer avatar axemixer commented on August 11, 2024

Yes you are right. I just forget about editting and insterting new lines to pmml in order to extract editional output.

Thanks

from jpmml-evaluator-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.