Comments (3)
.. prediction name and probability name of output result is hard coded.
That's intentional - helps to enforce a convention that all "function fields" are named as <name>(<arg1>, <arg2>, .., <argn>)
.
By this convention, probability is a "function field" whose name is probability
which that takes exactly one argument (category label).
For example, change probability(1) to probability-1
"Conventions over configuration".
If you're unhappy with the default naming system, then you can always rename fields using the Visitor API of the JPMML-Model library (eg. class org.jpmml.model.visitors.FieldRenamer
).
from jpmml-converter.
@vruusmann
Thanks a lot. Just want to know how can I get the probability name fields when I creating the name mapping? I have load the pmml model by using the function:
PMML load(InputStream is)
And then get call getModels() to fetch the model, and call model.getOutput(), and get null result. But form the pmml file, I can see there are two output fields. Do you have any advice? Thanks a lot.
<Output>
<OutputField name="probability_0" optype="continuous" dataType="float" feature="probability" value="0"/>
<OutputField name="probability_1" optype="continuous" dataType="float" feature="probability" value="1"/>
</Output>
test_classifier_pmml_46.tar.gz
from jpmml-converter.
And then get call getModels() to fetch the model, and call model.getOutput(), and get null result.
This sequence of calls queries the top-level model element. In your file, the top-level model element is the MiningModel
element, which in fact does not specify an Output
child element - so the null
result value is to be expected.
Anyway, one is not supposed to query PMML elements directly. You should be using the Evaluator#getOutputFields()
method, which would give you a two-element list (defined by the last segment on lines 936 -- 939 of your PMML file).
from jpmml-converter.
Related Issues (20)
- Support for `forecast::ets` models
- Request Support for 'survival::coxph' models HOT 1
- StackOverflowError HOT 15
- support tensorflow HOT 14
- PMML conversion : Casting float to decimal causing loss of Precision. HOT 7
- Support for more complex workflows HOT 1
- Constant elements should require a data type hint
- Support for transformer-only pipelines HOT 3
- SVM's classificationMethod is always "OneAgainstOne" HOT 3
- Ability to show/hide default attribute values
- Option to choose the carrier data format (XML vs. JSON vs. YAML) in all end user-facing converter tools HOT 2
- Support for transforming labels
- Reusable visitor for (re-)generating score distributions from leaf elements
- PMML version in xmlns tag does not match version tag HOT 1
- Controlling scientific notation in PMML document HOT 2
- Version of jpmml-converter correspond to version of spark HOT 1
- Failing to prune XGBoost tree models HOT 3
- Error on a pipeline with OneHotEncoder and xgboost HOT 2
- Streaming conversion mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpmml-converter.