{"id":22281515,"url":"https://github.com/jpmml/jpmml-model","last_synced_at":"2025-05-14T20:10:19.930Z","repository":{"id":14469995,"uuid":"17182007","full_name":"jpmml/jpmml-model","owner":"jpmml","description":"Java Class Model API for PMML","archived":false,"fork":false,"pushed_at":"2025-04-04T11:23:35.000Z","size":2347,"stargazers_count":154,"open_issues_count":1,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-10T09:58:44.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpmml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-25T17:39:17.000Z","updated_at":"2025-04-04T11:23:40.000Z","dependencies_parsed_at":"2025-01-29T02:31:13.045Z","dependency_job_id":"1126ac08-e7fd-49b4-8e27-0b61dceb3582","html_url":"https://github.com/jpmml/jpmml-model","commit_stats":null,"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmml%2Fjpmml-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmml%2Fjpmml-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmml%2Fjpmml-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmml%2Fjpmml-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpmml","download_url":"https://codeload.github.com/jpmml/jpmml-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219374,"owners_count":22034397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T16:18:51.400Z","updated_at":"2025-05-14T20:10:19.906Z","avatar_url":"https://github.com/jpmml.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["机器学习"],"readme":"JPMML-Model [![Build Status](https://github.com/jpmml/jpmml-model/workflows/maven/badge.svg)](https://github.com/jpmml/jpmml-model/actions?query=workflow%3A%22maven%22)\n===========\n\nJava Class Model API for Predictive Model Markup Language (PMML).\n\n# Features #\n\n* Full support for PMML 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 4.3 and 4.4 schemas:\n  * Schema version annotations.\n  * Extension elements, attributes, enum values.\n* Enhanced API:\n  * Class hierarchy.\n  * Marker interfaces for common traits.\n  * Value constructors.\n  * Method chaining-friendly setter methods.\n  * Optional SAX Locator information.\n* [Visitor pattern](https://en.wikipedia.org/wiki/Visitor_pattern):\n  * Validation agents.\n  * Optimization and transformation agents.\n* Supported platforms:\n  * Java SE and EE.\n  * Android.\n* Supported JAXB runtimes:\n  * [GlassFish Metro](https://metro.java.net)\n  * [EclipseLink MOXy](https://www.eclipse.org/eclipselink)\n* Supported SerDe runtimes:\n  * [Kryo](https://github.com/EsotericSoftware/kryo)\n  * [FasterXML Jackson](https://github.com/FasterXML/jackson)\n* Supported cross-compiler runtimes:\n  * [TeaVM](https://teavm.org)\n\n# Prerequisites #\n\n* Java 11 or newer.\n\n# Installation #\n\nJPMML-Model library JAR files (together with accompanying Java source and Javadocs JAR files) are released via the Maven Central Repository.\n\nThe current version is **1.7.3** (4 April, 2025).\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003eorg.jpmml\u003c/groupId\u003e\n\t\u003cartifactId\u003epmml-model\u003c/artifactId\u003e\n\t\u003cversion\u003e1.7.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Usage #\n\nThe class model consists of two types of classes. There is a small number of manually crafted classes that are used for structuring the class hierarchy. They are permanently stored in the Java sources directory `/pmml-model/src/main/java`. Additionally, there is a much larger number of automatically generated classes that represent actual PMML elements. They can be found in the generated Java sources directory `/pmml-model/target/generated-sources/xjc` after a successful build operation.\n\nAll class model classes descend from the `org.dmg.pmml.PMMLObject` base class. Additional class hierarchy levels, if any, represent common state and/or behaviour. For example, all model classes descend from the `org.dmg.pmml.Model` base class.\n\nThe class model should be self-explanatory. The application developer is advised to consult with the latest [PMML specification](https://dmg.org/pmml/v4-4-1/GeneralStructure.html) about the specifics of individual PMML elements and attributes.\n\n### Unmarshalling ###\n\nLoading a PMML schema version 3.X or 4.X document into a live `org.dmg.pmml.PMML` object:\n\n```java\npublic PMML load(InputStream is) throws SAXException, JAXBException {\n\treturn org.jpmml.model.PMMLUtil.unmarshal(is);\n}\n```\n\n**Important**: It is the responsibility of the application developer to ensure that the XML document does not contain malicious content (eg. XEE and XXE attacks).\n\n### Applying visitors ###\n\nDeleting SAX Locator information from the class model:\n\n```java\npublic void optimize(PMML pmml){\n\tvar visitor = new org.jpmml.model.visitors.LocatorNullifier();\n\n\tvisitor.applyTo(pmml);\n}\n```\n\n### Marshalling ###\n\nStoring a live `org.dmg.pmml.PMML` object into a PMML schema version 4.4 document:\n\n```java\npublic void store(PMML pmml, OutputStream os) throws JAXBException {\n\torg.jpmml.model.PMMLUtil.marshal(pmml, os);\n}\n```\n\n# License #\n\nJPMML-Model is licensed under the [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause).\n\n# Additional information #\n\nJPMML-Model is developed and maintained by Openscoring Ltd, Estonia.\n\nInterested in using [Java PMML API](https://github.com/jpmml) software in your company? Please contact [info@openscoring.io](mailto:info@openscoring.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpmml%2Fjpmml-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpmml%2Fjpmml-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpmml%2Fjpmml-model/lists"}