Convert Confidence Values to Regular Attribute

I am scoring data and get results in a column called "confidence". Easy enough, but this result data is hidden from use in downstream processes - cannot see the column in generate attributes, set role, select attributes, etc. The only place I see the output is in the yellow results column. Is there an operator to retrieve this confidence data and use it in downstream process steps? I can export to excel and reimport but this seems silly. thanks, Mike
Best Answer
-
excellent, typing in the value although it does not synch with meta-data worked. Thanks
1
Answers
-
After scoring, you can apply "set role" to convert special attribute confidence(true) to regular.
<?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.1.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="8.1.001" expanded="true" height="68" name="Retrieve medicaldata" width="90" x="45" y="34">
<parameter key="repository_entry" value="//Samples/Templates/Medical Fraud Detection/medicaldata"/>
</operator>
<operator activated="true" class="remove_correlated_attributes" compatibility="8.1.001" expanded="true" height="82" name="Remove Correlated Attributes" width="90" x="179" y="34"/>
<operator activated="true" class="concurrency:cross_validation" compatibility="8.1.001" expanded="true" height="145" name="Cross Validation" width="90" x="313" y="34">
<process expanded="true">
<operator activated="true" class="sample" compatibility="8.1.001" expanded="true" height="82" name="Sample" width="90" x="112" y="34">
<parameter key="sample" value="relative"/>
<parameter key="balance_data" value="true"/>
<list key="sample_size_per_class"/>
<list key="sample_ratio_per_class">
<parameter key="true" value="1.0"/>
<parameter key="false" value="0.2"/>
</list>
<list key="sample_probability_per_class"/>
</operator>
<operator activated="true" class="h2o:gradient_boosted_trees" compatibility="7.6.001" expanded="true" height="103" name="Gradient Boosted Trees" width="90" x="246" y="34">
<list key="expert_parameters"/>
</operator>
<connect from_port="training set" to_op="Sample" to_port="example set input"/>
<connect from_op="Sample" from_port="example set output" to_op="Gradient Boosted Trees" to_port="training set"/>
<connect from_op="Gradient Boosted Trees" from_port="model" to_port="model"/>
<portSpacing port="source_training set" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="8.1.001" expanded="true" height="82" name="Apply Model" width="90" x="112" y="34">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance_binominal_classification" compatibility="8.1.001" expanded="true" height="82" name="Performance GBT" width="90" x="313" y="34">
<parameter key="classification_error" value="true"/>
<parameter key="AUC" value="true"/>
<parameter key="precision" value="true"/>
<parameter key="recall" value="true"/>
<parameter key="specificity" value="true"/>
</operator>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance GBT" to_port="labelled data"/>
<connect from_op="Performance GBT" from_port="performance" to_port="performance 1"/>
<connect from_op="Performance GBT" from_port="example set" to_port="test set results"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_test set results" spacing="0"/>
<portSpacing port="sink_performance 1" spacing="0"/>
<portSpacing port="sink_performance 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="set_role" compatibility="8.1.001" expanded="true" height="82" name="Set Role" width="90" x="648" y="34">
<parameter key="attribute_name" value="confidence(true)"/>
<list key="set_additional_roles">
<parameter key="confidence(false)" value="regular"/>
</list>
</operator>
<connect from_op="Retrieve medicaldata" from_port="output" to_op="Remove Correlated Attributes" to_port="example set input"/>
<connect from_op="Remove Correlated Attributes" from_port="example set output" to_op="Cross Validation" to_port="example set"/>
<connect from_op="Cross Validation" from_port="test result set" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>1 -
thanks, but the confidence attributes are not available as selectable attributes after the "apply model" operator in the generate attribute or set role operators...the results are there in the results tab...
0 -
Sometimes the name of the confidence attribute (or other special attributes) does not prepopulate in the pull down for attribute selection in subsequent operators because of a metadata propagation problem. You can try to fix this by enabling the "synchronize meta data with real data" option from the "Process" menu at the top, or you can just type the name of the confidence attribute into the "Set Role" operator directly and it will work.
1 -
excellent, typing in the value although it does not synch with meta-data worked. Thanks
1