Package weka.core

Examples of weka.core.SelectedTag


    testType(Attribute.NOMINAL);
  }

  public void testAddString() {
    m_Filter = getFilter();
    ((Add) m_Filter).setAttributeType(new SelectedTag(Attribute.STRING, Add.TAGS_TYPE));
    testBuffered();
    testType(Attribute.STRING);
  }
View Full Code Here


    testType(Attribute.STRING);
  }

  public void testAddDate() {
    m_Filter = getFilter();
    ((Add) m_Filter).setAttributeType(new SelectedTag(Attribute.DATE, Add.TAGS_TYPE));
    testBuffered();
    testType(Attribute.DATE);
  }
View Full Code Here

  public Filter getFilter(int numAtts, int algorithm) {
    PLSFilter filter = new PLSFilter();
   
    filter.setNumComponents(numAtts);
    filter.setReplaceMissing(true);
    filter.setPreprocessing(new SelectedTag(PLSFilter.PREPROCESSING_CENTER, PLSFilter.TAGS_PREPROCESSING));
    filter.setAlgorithm(new SelectedTag(algorithm, PLSFilter.TAGS_ALGORITHM));

    return filter;
  }
View Full Code Here

    else
      setRidge(1.0e-6);

    tmpStr = Utils.getOption('A', options);
    if (tmpStr.length() != 0) {
      setAlgorithmType(new SelectedTag(Integer.parseInt(tmpStr), TAGS_ALGORITHMTYPE));
    } else {
      setAlgorithmType(new SelectedTag(ALGORITHMTYPE_DEFAULT, TAGS_ALGORITHMTYPE));
    }    
  }
View Full Code Here

   * Gets the type of algorithm.
   *
   * @return the algorithm type
   */
  public SelectedTag getAlgorithmType() {
    return new SelectedTag(m_AlgorithmType, TAGS_ALGORITHMTYPE);
  }
View Full Code Here

    if (m_minimax){
      /* using SimpleMI class minimax transform method.
         this method transforms the multi-instance dataset into minmax feature space (single-instance) */
      SimpleMI transMinimax = new SimpleMI();
      transMinimax.setTransformMethod(
          new SelectedTag(
            SimpleMI.TRANSFORMMETHOD_MINIMAX, SimpleMI.TAGS_TRANSFORMMETHOD));
      transformedInsts = transMinimax.transform(insts);
    }
    else {
      convertToProp.setInputFormat(insts);
View Full Code Here

    Filter convertToMI = new PropositionalToMultiInstance();

    if (m_minimax){ // using minimax feature space
      SimpleMI transMinimax = new SimpleMI();
      transMinimax.setTransformMethod(
          new SelectedTag(
            SimpleMI.TRANSFORMMETHOD_MINIMAX, SimpleMI.TAGS_TRANSFORMMETHOD));
      insts = transMinimax.transform (insts);
    }
    else{
      convertToProp.setInputFormat(insts);
View Full Code Here

    setMinimax(Utils.getFlag('I', options));

    tmpStr = Utils.getOption('N', options);
    if (tmpStr.length() != 0)
      setFilterType(new SelectedTag(Integer.parseInt(tmpStr), TAGS_FILTER));
    else
      setFilterType(new SelectedTag(FILTER_NORMALIZE, TAGS_FILTER));
   
    setBuildLogisticModels(Utils.getFlag('M', options));
   
    tmpStr = Utils.getOption('V', options);
    if (tmpStr.length() != 0)
View Full Code Here

   *
   * @return the filtering mode
   */
  public SelectedTag getFilterType() {

    return new SelectedTag(m_filterType, TAGS_FILTER);
  }
View Full Code Here

   *
   * @return a value of type 'String'
   */
  public String getJavaInitializationString() {

    SelectedTag s = (SelectedTag)getValue();
    Tag [] tags = s.getTags();
    String result = "new SelectedTag("
      + s.getSelectedTag().getID()
      + ", {\n";
    for (int i = 0; i < tags.length; i++) {
      result += "new Tag(" + tags[i].getID()
  + ",\"" + tags[i].getReadable()
  + "\")";
View Full Code Here

TOP

Related Classes of weka.core.SelectedTag

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.