首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >序列RapidMiner多滤波器

序列RapidMiner多滤波器
EN

Stack Overflow用户
提问于 2013-03-04 20:59:13
回答 2查看 1.4K关注 0票数 0

我是RapidMiner...What的新手,我试图做的是,我有一个使用ProcessDocuments操作符(子任务)标记的10个文档列表,-> Tokenize...the结果是一个10×800示例集,包含10行(每个文档一行)和800个属性(每个令牌一个)。

现在我想过滤800个令牌,我再次使用ProcessDocuments运算符(子任务)-> filterbylength 在世界列表上生成,由以前的ProcessDocuments操作符...the结果是一个800×700矩阵. 800表示来自上一个ProcessDocuments操作符的800个令牌和700个减少的令牌集。

我想要实现的是一个10×700实例集,它可以传递给Kmeans集群运算符。我怎么能这么做?

谢谢

EN

回答 2

Stack Overflow用户

发布于 2013-03-06 09:19:50

我不知道为什么要使用两个"Process“操作符,因为您可以在第一个操作符中添加"Tokenize”和"Filter Tokens (按长度计算)“,这将产生所需的结果。

这是一个很小的例子。

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="text:create_document" compatibility="5.3.000" expanded="true" height="60" name="Create Document" width="90" x="45" y="75">
        <parameter key="text" value="This is a test with a looooooooooong word"/>
      </operator>
      <operator activated="true" class="text:create_document" compatibility="5.3.000" expanded="true" height="60" name="Create Document (2)" width="90" x="45" y="165">
        <parameter key="text" value="Again a text which has anoooooooooooooother long word."/>
      </operator>
      <operator activated="true" class="text:process_documents" compatibility="5.3.000" expanded="true" height="112" name="Process Documents" width="90" x="313" y="75">
        <process expanded="true">
          <operator activated="true" class="text:tokenize" compatibility="5.3.000" expanded="true" height="60" name="Tokenize" width="90" x="45" y="30"/>
          <operator activated="true" class="text:filter_by_length" compatibility="5.3.000" expanded="true" height="60" name="Filter Tokens (by Length)" width="90" x="179" y="30">
            <parameter key="max_chars" value="10"/>
          </operator>
          <connect from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_op="Filter Tokens (by Length)" to_port="document"/>
          <connect from_op="Filter Tokens (by Length)" 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>
      <operator activated="true" class="k_means" compatibility="5.3.005" expanded="true" height="76" name="Clustering" width="90" x="447" y="75"/>
      <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="Process Documents" from_port="example set" to_op="Clustering" to_port="example set"/>
      <connect from_op="Clustering" from_port="cluster model" 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
EN

Stack Overflow用户

发布于 2013-04-14 19:42:24

我倾向于同意已经给出的答案;看起来它解决了这个问题,但是您可以做下面这样的事情。

  • 使用WordList将800个单词列表转换为一个示例集,并将其转换为数据操作符。
  • 使用“标称为文本”运算符将多标称word属性的类型更改为“文本”。
  • 在文本属性上使用来自数据运算符的处理文档,并在其中按长度进行筛选。

我做了一些有点类似的这里

700字的限制将很难控制。在我看来,一个按长度排序的单词列表不太可能在700的时候被方便地切断。

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

https://stackoverflow.com/questions/15211010

复制
相关文章

相似问题

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