在RapidMiner中导出分布模型

时间:2016-01-18 08:26:46

标签: rapidminer

我在快速矿工中设置了一个示例。它有2列。 例如

colA  colB 
a     1
a     2
b     3
b     2

=====

我使用了朴素的贝叶斯。它给出了分布表中colA的每个colB的概率。 例如,P(2) = .5

I need that distribution table output. 
write model, excel csv, write does not help.

我该怎么办? 提前谢谢。

2 个答案:

答案 0 :(得分:1)

最简单的解决方案是用鼠标标记表格(Strg + A也可以),并使用复制和粘贴。

不幸的是,这只能手动工作,如果你必须经常导出数据,下一个最好的步骤就是为它编写自己的操作符(这实际上很简单,只需要基本的Java技能): http://docs.rapidminer.com/developers/

答案 1 :(得分:0)

是的,你可以。如果您从市场安装Reporting扩展(它是免费的),那么您可以导出分发表,绘图视图或文本视图。
这是一个示例流程。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="7.0.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="reporting:generate_report" compatibility="5.3.000" expanded="true" height="68" name="Generate Report" width="90" x="45" y="34">
        <parameter key="report_name" value="myReport"/>
      </operator>
      <operator activated="true" class="retrieve" compatibility="7.0.000" expanded="true" height="68" name="Golf" width="90" x="112" y="85">
        <parameter key="repository_entry" value="//Samples/data/Golf"/>
      </operator>
      <operator activated="true" class="retrieve" compatibility="7.0.000" expanded="true" height="68" name="Golf-Testset" width="90" x="179" y="210">
        <parameter key="repository_entry" value="//Samples/data/Golf-Testset"/>
      </operator>
      <operator activated="true" class="naive_bayes" compatibility="7.0.000" expanded="true" height="82" name="Naive Bayes" width="90" x="246" y="34"/>
      <operator activated="true" class="reporting:report" compatibility="5.3.000" expanded="true" height="68" name="Report" width="90" x="380" y="34">
        <parameter key="report_name" value="myReport"/>
        <parameter key="report_item_header" value="Distribution Table"/>
        <parameter key="specified" value="true"/>
        <parameter key="reportable_type" value="Distribution Model"/>
        <parameter key="renderer_name" value="Distribution Table"/>
        <list key="parameters">
          <parameter key="min_row" value="1"/>
          <parameter key="max_row" value="2147483647"/>
          <parameter key="min_column" value="1"/>
          <parameter key="max_column" value="2147483647"/>
          <parameter key="sort_column" value="2147483647"/>
          <parameter key="sort_decreasing" value="false"/>
        </list>
      </operator>
      <operator activated="true" class="apply_model" compatibility="7.0.000" expanded="true" height="82" name="Apply Model" width="90" x="514" y="120">
        <list key="application_parameters"/>
      </operator>
      <connect from_op="Golf" from_port="output" to_op="Naive Bayes" to_port="training set"/>
      <connect from_op="Golf-Testset" from_port="output" to_op="Apply Model" to_port="unlabelled data"/>
      <connect from_op="Naive Bayes" from_port="model" to_op="Report" to_port="reportable in"/>
      <connect from_op="Report" from_port="reportable out" to_op="Apply Model" to_port="model"/>
      <connect from_op="Apply Model" from_port="labelled data" to_port="result 1"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="90"/>
      <portSpacing port="sink_result 2" spacing="18"/>
    </process>
  </operator>
</process>