通过 rapidminer 在单独的行中显示多值多项式值
Display multivalued polynominal values in separate rows by rapidminer
在 rapidminer 中,我有一个具有“戏剧”、"Comedy" 和“浪漫”值的多项式属性,但有些行是多值的,例如“戏剧,浪漫”,这是我可以在单独的行中显示这些值?
我试过拆分运算符,但它在单独的属性中显示值,但我想在单独的行中显示这些值。
您可以使用二项式 运算符为每个单独的值创建新列。
最佳,
大卫
我想你要做的是首先使用 Split 运算符获取单独的属性。 table 就像:
word_1, word_2, word_3...
Drama, Romance,
Comedy, Romance
..
之后您可以在 word_\d+ 上使用 Depivot 将它们放入单独的示例中。附件是显示此过程的过程。
最好的,
马丁
<?xml version="1.0" encoding="UTF-8"?><process version="7.5.003">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.5.003" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data_user_specification" compatibility="7.5.003" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="45" y="85">
<list key="attribute_values">
<parameter key="word" value=""Drama, Romance""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_data_user_specification" compatibility="7.5.003" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="45" y="187">
<list key="attribute_values">
<parameter key="word" value=""Comedy, Thriller""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="append" compatibility="7.5.003" expanded="true" height="103" name="Append" width="90" x="179" y="85"/>
<operator activated="true" class="split" compatibility="7.5.003" expanded="true" height="82" name="Split" width="90" x="447" y="85"/>
<operator activated="true" class="de_pivot" compatibility="7.5.003" expanded="true" height="82" name="De-Pivot" width="90" x="648" y="85">
<list key="attribute_name">
<parameter key="word" value="word_\d+"/>
</list>
<parameter key="index_attribute" value="id"/>
</operator>
<connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
<connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
<connect from_op="Append" from_port="merged set" to_op="Split" to_port="example set input"/>
<connect from_op="Split" from_port="example set output" to_op="De-Pivot" to_port="example set input"/>
<connect from_op="De-Pivot" 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>
在 rapidminer 中,我有一个具有“戏剧”、"Comedy" 和“浪漫”值的多项式属性,但有些行是多值的,例如“戏剧,浪漫”,这是我可以在单独的行中显示这些值?
我试过拆分运算符,但它在单独的属性中显示值,但我想在单独的行中显示这些值。
您可以使用二项式 运算符为每个单独的值创建新列。
最佳,
大卫
我想你要做的是首先使用 Split 运算符获取单独的属性。 table 就像:
word_1, word_2, word_3...
Drama, Romance,
Comedy, Romance
..
之后您可以在 word_\d+ 上使用 Depivot 将它们放入单独的示例中。附件是显示此过程的过程。
最好的, 马丁
<?xml version="1.0" encoding="UTF-8"?><process version="7.5.003">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.5.003" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data_user_specification" compatibility="7.5.003" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="45" y="85">
<list key="attribute_values">
<parameter key="word" value=""Drama, Romance""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_data_user_specification" compatibility="7.5.003" expanded="true" height="68" name="Generate Data by User Specification (2)" width="90" x="45" y="187">
<list key="attribute_values">
<parameter key="word" value=""Comedy, Thriller""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="append" compatibility="7.5.003" expanded="true" height="103" name="Append" width="90" x="179" y="85"/>
<operator activated="true" class="split" compatibility="7.5.003" expanded="true" height="82" name="Split" width="90" x="447" y="85"/>
<operator activated="true" class="de_pivot" compatibility="7.5.003" expanded="true" height="82" name="De-Pivot" width="90" x="648" y="85">
<list key="attribute_name">
<parameter key="word" value="word_\d+"/>
</list>
<parameter key="index_attribute" value="id"/>
</operator>
<connect from_op="Generate Data by User Specification" from_port="output" to_op="Append" to_port="example set 1"/>
<connect from_op="Generate Data by User Specification (2)" from_port="output" to_op="Append" to_port="example set 2"/>
<connect from_op="Append" from_port="merged set" to_op="Split" to_port="example set input"/>
<connect from_op="Split" from_port="example set output" to_op="De-Pivot" to_port="example set input"/>
<connect from_op="De-Pivot" 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>