Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.Add


        segments.add(seg3);

        Instances basicInstances = segments.getBasicExamples().getInstances();

        String attrName = "newAtt";
        Add addFilter = new Add();
        addFilter.setAttributeName(attrName);
        addFilter.setAttributeType(new SelectedTag(0, Add.TAGS_TYPE));
        try {
            addFilter.setInputFormat(basicInstances);
        } catch (Exception e) {
            assertTrue(e.getMessage(), false);
        }

        RemoveWithValues removeFilter = new RemoveWithValues();
        removeFilter.setAttributeIndex("3"); //the label attribute
        removeFilter.setNominalIndicesArr(new int[]{0}); //false
        try {
            removeFilter.setInputFormat(addFilter.getOutputFormat());
        } catch (Exception e) {
            assertTrue(e.getMessage(), false);
        }

        FeatureSpecification spec = new FeatureSpecification();
View Full Code Here

TOP

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

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.