Package weka.filters.unsupervised.attribute

Examples of weka.filters.unsupervised.attribute.NumericToNominal


    //read from libsvm format files
    Instances instances = libsvm.getDataSet();
   
    //convert to nominal class argument to avoid
    // exception in weka's smo :-/
    NumericToNominal filter = new NumericToNominal();
    filter.setInputFormat(instances);
    instances = Filter.useFilter(instances, filter);
   
   
    Random ran = new Random(System.currentTimeMillis());
    instances.randomize(ran);
View Full Code Here


           
            try {
                this.splits[idx] = new Instances(data, offset, this.split_counts[idx]);
           
                // Apply NumericToNominal filter!
                NumericToNominal filter = new NumericToNominal();
                filter.setInputFormat(this.splits[idx]);
                this.splits[idx] = Filter.useFilter(this.splits[idx], filter);
               
            } catch (Exception ex) {
                throw new RuntimeException("Failed to split " + stype + " workload", ex);
            }
View Full Code Here

            cluster_h.put(c);
        } // FOR
        System.err.println("Number of Elements: " + cluster_h.getValueCount());
        System.err.println(cluster_h);

        NumericToNominal filter = new NumericToNominal();
        filter.setInputFormat(newData);
        newData = Filter.useFilter(newData, filter);
       
        String output = this.catalog_proc.getName() + "-labeled.arff";
        FileUtil.writeStringToFile(output, newData.toString());
        LOG.info("Wrote labeled data set to " + output);
View Full Code Here

            Map<Procedure, FeatureSet> fsets = new FeatureExtractor(catalogContext, p_estimator).calculate(workload);
            FeatureSet fset = fsets.get(catalog_proc);
            assertNotNull(fset);
            data = fset.export(catalog_proc.getName(), false);
           
            NumericToNominal weka_filter = new NumericToNominal();
            weka_filter.setInputFormat(data);
            data = Filter.useFilter(data, weka_filter);
        }
        assertNotNull(data);
       
        fclusterer = new FeatureClusterer(catalogContext, catalog_proc, workload, catalogContext.getAllPartitionIds());
View Full Code Here

TOP

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

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.