Package weka.filters

Examples of weka.filters.AllFilter


      objects.add(Utils.forName(Filter.class, classname, options2));
    }

    // at least one filter
    if (objects.size() == 0)
      objects.add(new AllFilter());

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));

    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
View Full Code Here


    Instances result = null;
    m_Instances.setClassIndex(2);
   
    try {
      result = applyFilter(
    new Filter[]{new AllFilter(), new AllFilter()},
    new Range[]{new Range("1-2"),new Range("4-5")},
    false);
    }
    catch (Exception e) {
      fail("Problem applying the filter: " + e);
View Full Code Here

    Instances result = null;
    m_Instances.setClassIndex(2);
   
    try {
      result = applyFilter(
    new Filter[]{new AllFilter(), new AllFilter()},
    new Range[]{new Range("1-2"),new Range("5")},
    true);
    }
    catch (Exception e) {
      fail("Problem applying the filter: " + e);
View Full Code Here

    Instances result = null;
    m_Instances.setClassIndex(2);
   
    try {
      result = applyFilter(
    new Filter[]{new AllFilter(), new AllFilter()},
    new Range[]{new Range("1,2,4"),new Range("2,4")},
    false);
    }
    catch (Exception e) {
      fail("Problem applying the filter: " + e);
View Full Code Here

    Instances result = null;
    m_Instances.setClassIndex(2);
   
    try {
      result = applyFilter(
    new Filter[]{new AllFilter(), new AllFilter()},
    new Range[]{new Range("1,2,4"),new Range("2,4")},
    true);
    }
    catch (Exception e) {
      fail("Problem applying the filter: " + e);
View Full Code Here

      objects.add(Utils.forName(Filter.class, classname, options2));
    }

    // at least one filter
    if (objects.size() == 0)
      objects.add(new AllFilter());

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));

    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
View Full Code Here

      objects.add(Utils.forName(Filter.class, classname, options2));
    }

    // at least one filter
    if (objects.size() == 0)
      objects.add(new AllFilter());

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));
   
    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
View Full Code Here

      objects.add(Utils.forName(Filter.class, classname, options2));
    }

    // at least one filter
    if (objects.size() == 0)
      objects.add(new AllFilter());

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));

    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
View Full Code Here

//            }
        }
        } catch (Exception e) {System.out.println(e.toString()); return;}

        ArrayList factorialOut = new ArrayList();
        Filter allF = new AllFilter();
        allF = null;
        Filter genericFilter = null;
        ArrayList factorialInB = null;
        try {
        for (Integer count_removes = 0; count_removes<aRemoves.size(); count_removes++){
           for (Integer count_discrete = 0; count_discrete<aDiscrete.size(); count_discrete++) {
                for (Integer count_CVFolds = 0; count_CVFolds<aCVFolds.length; count_CVFolds++){
                    factorialInB = new ArrayList();
                    factorialInB.add((Integer) Integer.parseInt(TxtNumIters));
                    factorialInB.add((Integer) aCVFolds[count_CVFolds]);
                    factorialInB.add((Integer) Integer.parseInt(TxtCVnumIters));
                    factorialInB.add((Integer) Integer.parseInt(TxtCVSeed));
                    if (!aRemoves.get(count_removes).equals("escape")){
                        String[] opt = {"-R", aRemoves.get(count_removes)};
                        genericFilter = (Filter) Class.forName("weka.filters.unsupervised.attribute.Remove").newInstance();
                        if (genericFilter instanceof OptionHandler)
                        ((OptionHandler) genericFilter).setOptions(opt);
                        factorialInB.add(genericFilter);
                    }
                    if (!aDiscrete.get(count_discrete)[0].equals("escape")){
                        String[] opt = aDiscrete.get(count_discrete);
                        genericFilter = (Filter) Class.forName("weka.filters.unsupervised.attribute.Discretize").newInstance();
                        if (genericFilter instanceof OptionHandler)
                        ((OptionHandler) genericFilter).setOptions(opt);
                        factorialInB.add(genericFilter);
                    }
                    if (aRemoves.get(count_removes).equals("escape") && aDiscrete.get(count_discrete).equals("escape")){
                        allF = new AllFilter();
                        factorialInB.add(allF);
                    }

                    factorialOut.add(factorialInB);
                }
View Full Code Here

TOP

Related Classes of weka.filters.AllFilter

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.