{ "info": { "author": "Nick Coghlan", "author_email": "ncoghlan@redhat.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License" ], "description": "pyscorecard\n===========\n\nPython client for submitting PMML ScoreCard models and queries against\nthem to OpenScoring\n\nPMML ScoreCards: http://dmg.org/pmml/v4-2-1/Scorecard.html for\nadditional background\n\nOpenScoring REST API: https://github.com/jpmml/openscoring Demo\ninstance: http://openscoring-ncoghlan.rhcloud.com/openscoring/ Demo git\nrepo: https://github.com/ncoghlan/openscoring-openshift\n\nPMML ScoreCard generation from JSON input\n-----------------------------------------\n\nCommand line invocation:\n\n::\n\n pyscorecard input_spec.json pmml_output_dir\n\nOutput PMML file names are generated based on a combination of\n\"model\\_name\" and \"param\\_grid\" entries as described below.\n\nIn the Python API, ``scorecard.pmml_scorecard`` generates PMML scorecard\ndefinitions from a JSON-compatible input mapping.\n\nSee examples/risk\\_example.json (input) and examples/risk\\_example.xml\n(output)\n\nAll ScoreCards produce a single predicted risk score and up to 3 reason\ncodes:\n\n- ``RiskScore``\n- ``ReasonCode1``\n- ``ReasonCode2``\n- ``ReasonCode3``\n\nGenerated ScoreCards are also currently all hardcoded to use the\n\"pointsAbove\" reason code algorithm, the \"min\" baseline score algorithm,\n``0`` as the initial score for the overall scorecard evaluation and\n``1`` as the baseline score for each individual characteristic (this\nensures that characteristics achieving a partial score of ``0`` are\nnever reported as reason codes for the overall risk scoring).\n\nThe input format is a JSON mapping with the following fields:\n\n- ``model_name``: name of the model (also used as output filename\n prefix)\n- ``param_grid``: parameter definitions for use in characteristic\n predicates\n\n- key is the variable name that can be substituted into predicates\n- value is a mapping of output filename suffixes to substition values\n- when multiple grid parameters are defined, keys are lexically sorted\n when determining the combined output filename\n\n- ``data_fields``: sequence of field definitions for the DataDictionary\n and MiningSchema sections in the generated PMML Scorecard\n\n- ``name``: used in both the DataField entry and the MiningField entry\n- ``dataType``: used in the DataField entry\n- ``optype``: used in the DataField entry to define handling of\n comparisons\n- ``values``: permitted values for categorical and ordinal fields\n\n- ``characteristics``: sequence of definitions for the Characteristic\n section in the generated PMML Scorecard\n\n- ``name``: data field used by this characteristic. Also used to derive\n the characteristic name as ``name + \"Score\"`` and the overall\n characteristic reason code as ``name + \"RC\"``\n- ``attributes``: sequence of attribute definitions used by the\n characteristic\n\n - ``reasonCode``: specific reason code when this criterion is met\n - ``partialScore``: contribution to the risk score when this\n criterion is met\n - ``predicate``: predicate defining this criterion (see below for\n details)\n\nPredicates can be defined as either a single string, or as a sequence of\nsuch strings. Each string predicate is of the form \"OP value\", with the\ndata field named in the characteristic definition being the implied left\nhand side of the operation. Predicate sequences are implicitly and'ed\ntogether to define the overall criterion to be met for that attribute.\nPredicate values may start with ``$`` to indicate a grid parameter -\nthese will be substituted with the appropriate value for the scorecard\ncurrently being generated.\n\nPermitted operations are ``==`` for data fields with the ``categorical``\noptype, and ``==``, ``<``, ``<=``, ``>=``, and ``>`` for data fields\nwith the ``ordinal`` or ``continuous`` optype.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ncoghlan/pyscorecard/", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "scorecard", "package_url": "https://pypi.org/project/scorecard/", "platform": null, "project_url": "https://pypi.org/project/scorecard/", "project_urls": { "Homepage": "https://github.com/ncoghlan/pyscorecard/" }, "release_url": "https://pypi.org/project/scorecard/0.3/", "requires_dist": [ "lxml", "tabulate" ], "requires_python": null, "summary": "PMML Scorecard generator", "version": "0.3" }, "last_serial": 2009647, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "74cf22327afe763f702c6dea7b1b3635", "sha256": "7280133052f5a19135948904ddb012d271cbcc72b56999492622f6acbcee7c28" }, "downloads": -1, "filename": "scorecard-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "74cf22327afe763f702c6dea7b1b3635", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3990, "upload_time": "2016-03-14T07:58:37", "url": "https://files.pythonhosted.org/packages/82/86/eb995fe503989c1c9720dff2c3eb4848d090176b4fb24daa01cfb1c3788f/scorecard-0.1-py2.py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "c8f4818857385472a59d6a8d198c20d9", "sha256": "c50826270888f0cc5211a36bb7c5509a893bb791d0879e54c578854f5307246b" }, "downloads": -1, "filename": "scorecard-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c8f4818857385472a59d6a8d198c20d9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4001, "upload_time": "2016-03-14T08:38:13", "url": "https://files.pythonhosted.org/packages/81/77/48de00217630abc16ea4832c8fdbd5b07bab0c3e7f08da620924a8ea5a5f/scorecard-0.2-py2.py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "6eb5cec6847f9ab259ab346efff54c78", "sha256": "5fef102af3ec99ad8cadf591222083fb5cc65734264a82b1106038f2f6f06dd2" }, "downloads": -1, "filename": "scorecard-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6eb5cec6847f9ab259ab346efff54c78", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5393, "upload_time": "2016-03-16T08:29:34", "url": "https://files.pythonhosted.org/packages/1c/04/07af04edf3caa78d13c13795a8e0a9fefcf5b5b595c9b51f56e322c7886a/scorecard-0.3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6eb5cec6847f9ab259ab346efff54c78", "sha256": "5fef102af3ec99ad8cadf591222083fb5cc65734264a82b1106038f2f6f06dd2" }, "downloads": -1, "filename": "scorecard-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6eb5cec6847f9ab259ab346efff54c78", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5393, "upload_time": "2016-03-16T08:29:34", "url": "https://files.pythonhosted.org/packages/1c/04/07af04edf3caa78d13c13795a8e0a9fefcf5b5b595c9b51f56e322c7886a/scorecard-0.3-py2.py3-none-any.whl" } ] }