Package net.sf.javaml.core

Examples of net.sf.javaml.core.Dataset


        if(itemClassMap.isEmpty()){
            throw new RuntimeException("Map should have at least one element!");
        }
       
        //initialize jml dataset
        Dataset jmlDataset = new DefaultDataset();
       
        //iterate through Map
        for(Map.Entry<double[],String> entry : itemClassMap.entrySet()){
           
            //initialize Instance from Map entry Key (double array) and Value (String) class value
            Instance dataRow = new DenseInstance(entry.getKey(), entry.getValue());
           
            //add Instance to jml dataset
            jmlDataset.add(dataRow);
        }
       
        return jmlDataset;
    }
View Full Code Here

TOP

Related Classes of net.sf.javaml.core.Dataset

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.