Closed axemixer closed 1 year ago
You can tweak the PMML representation of estimator objects using conversion options.
They can be set manually by defining a pmml_options_
attribute, which is a dict of key-value pairs. Alternatively, they can be set semi-automatically for the final estimator step using the PMMLPipeline.configure(**pmml_options)
method.
Is there any chance that I can also add node id's into new output
First, you can toggle node identifiers on and off by setting the node_id
conversion option:
classifier = DecisionTreeClassifier()
# THIS!
classifier.pmml_options = {"node_id" : True}
Node identifiers are "off" by default, because they take up extra space, and would be lost anyway when performing tree reorganizations (compaction and flattening).
Second, you can enable the generation of the Output@feature="entityId"
element by setting the winner_id
conversion option:
pipeline = PMMLPipeline([
("classifier", classifier)
])
pipeline.fit(X, y)
# THIS!
pipeline.configure(node_id = True, winner_id = True)
Hello ,
I have a basic tree model represented as pmml file. I can take score in pmml output. Is there any chance that I can also add node id's into new output ?
Basic tree model:
Output section of tree model :