Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.AddExpression


            }
          }

          avExpression += ")/" + denom;
          avAttName += ")";
          AddExpression addE = new AddExpression();
          addE.setName(avAttName);
          addE.setExpression(avExpression);
          addE.setInputFormat(insts);
          insts = Filter.useFilter(insts, addE);
          m_averagedLagMakers.add(addE);

          i += denom;
        } else {
View Full Code Here


       * = insts.instance(insts.numInstances() - 2); m_deltaTime =
       * first.value(timeStampIndex) - two.value(timeStampIndex);
       */

      m_timeIndexMakers = new ArrayList<Filter>();
      AddExpression addE = new AddExpression();
      addE.setName(timeStampName + "^2");
      addE.setExpression("a" + (timeStampIndex + 1) + "^2");
      addE.setInputFormat(insts);
      insts = Filter.useFilter(insts, addE);
      m_timeIndexMakers.add(addE);

      addE = new AddExpression();
      addE.setName(timeStampName + "^3");
      addE.setExpression("a" + (timeStampIndex + 1) + "^3");
      addE.setInputFormat(insts);
      insts = Filter.useFilter(insts, addE);
      m_timeIndexMakers.add(addE);
    }

    return insts;
View Full Code Here

      if (!(insts.attribute(i).name().startsWith("Lag_") || insts.attribute(i)
          .name().startsWith("Avg("))) {
        break;
      }

      AddExpression addE = new AddExpression();
      addE.setName(timeStampName + "*" + insts.attribute(i).name());
      addE.setExpression("a" + (timeStampIndex + 1) + "*a" + (i + 1));
      addE.setInputFormat(insts);
      insts = Filter.useFilter(insts, addE);
      m_timeLagCrossProductMakers.add(addE);
    }

    return insts;
View Full Code Here

    MultiFilter result = new MultiFilter();
   
    Filter[] filters = new Filter[2];
    filters[0] = new Add();
    ((Add) filters[0]).setAttributeIndex("last");
    filters[1] = new AddExpression();
    ((AddExpression) filters[1]).setExpression("a3+a6");
   
    result.setFilters(filters);
   
    return result;
View Full Code Here

    atts = new FastVector();
    atts.addElement(new Attribute("x"));
   
    m_RawData = new Instances(getRelationNameToUse(), atts, 0);

    m_Filter = new AddExpression();
    m_Filter.setName("y");
    m_Filter.setExpression(getExpression());
    m_Filter.setInputFormat(m_RawData);

    return super.defineDataFormat();
View Full Code Here

    atts = new FastVector();
    atts.addElement(new Attribute("x"));
   
    m_RawData = new Instances(getRelationNameToUse(), atts, 0);

    m_Filter = new AddExpression();
    m_Filter.setName("y");
    m_Filter.setExpression(getExpression());
    m_Filter.setInputFormat(m_RawData);

    return super.defineDataFormat();
View Full Code Here

TOP

Related Classes of weka.filters.unsupervised.attribute.AddExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.