首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在RapidMiner中降低文本维度

如何在RapidMiner中降低文本维度
EN

Stack Overflow用户
提问于 2017-06-27 03:35:22
回答 1查看 256关注 0票数 0

我在使用Rapid Miner来降低文本挖掘的特征维度方面遇到了挑战。在这一点上,我正在通过单词标记来处理文本,这导致了一个非常大的维度集,这对于建模和预测并不理想。我如何改进流程,以使用其他方法清理数据,并只接受相关的单词?

我尝试过应用tfidf,但它删除了target变量,并且在模型阶段之前我看不到它做了什么。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-27 18:56:33

Process Documents操作符有一个修剪选项,在这个选项中,通过仔细设置参数,您可以删除常见和罕见的属性。

这里有一个玩具示例来说明它的工作原理。

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?><process version="7.5.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.5.000" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="text:create_document" compatibility="7.4.001" expanded="true" height="68" name="Create Document" width="90" x="179" y="187">
        <parameter key="text" value="the cat sat on the mat&#10;the dog barked at the man&#10;the cow ate the grass&#10;the man sat on the grass"/>
      </operator>
      <operator activated="true" class="text:create_document" compatibility="7.4.001" expanded="true" height="68" name="Create Document (2)" width="90" x="179" y="289">
        <parameter key="text" value="the cat sat on the mat&#10;the man sat on the grass&#10;the rain in spain falls mainly on the plain"/>
      </operator>
      <operator activated="true" class="text:create_document" compatibility="7.4.001" expanded="true" height="68" name="Create Document (3)" width="90" x="179" y="391">
        <parameter key="text" value="the world is round"/>
      </operator>
      <operator activated="true" class="text:process_documents" compatibility="7.4.001" expanded="true" height="145" name="Process Documents" width="90" x="447" y="187">
        <parameter key="vector_creation" value="Term Occurrences"/>
        <parameter key="prune_method" value="absolute"/>
        <parameter key="prune_above_percent" value="40.0"/>
        <parameter key="prune_below_absolute" value="2"/>
        <parameter key="prune_above_absolute" value="5"/>
        <process expanded="true">
          <operator activated="true" class="text:tokenize" compatibility="7.4.001" expanded="true" height="68" name="Tokenize" width="90" x="246" y="34"/>
          <connect from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_port="document 1"/>
          <portSpacing port="source_document" spacing="0"/>
          <portSpacing port="sink_document 1" spacing="0"/>
          <portSpacing port="sink_document 2" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Create Document" from_port="output" to_op="Process Documents" to_port="documents 1"/>
      <connect from_op="Create Document (2)" from_port="output" to_op="Process Documents" to_port="documents 2"/>
      <connect from_op="Create Document (3)" from_port="output" to_op="Process Documents" to_port="documents 3"/>
      <connect from_op="Process Documents" from_port="example set" 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>

它需要一些关注,以使其恰到好处,但希望这将帮助您开始。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44767398

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档