Package net.sf.javaml.core

Examples of net.sf.javaml.core.Instance


     */
    @Override
    public String classify(double[] item) {
       
        //initialize Instance from double array
        Instance testInstance = new DenseInstance(item);
       
        //classifiy testInstance
        Object classOfTestInstance = jmlClassifier.classify(testInstance);
       
        return (String) classOfTestInstance;
View Full Code Here


     */
    @Override
    public Map<String, Double> classDistribution(double[] item) {
       
        //initialize Instance from double array
        Instance testInstance = new DenseInstance(item);
       
        //calculate predict values for class values
        Map<Object,Double> map = jmlClassifier.classDistribution(testInstance);
       
        //convert map with Object key to map with String key
View Full Code Here

       
        //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);
        }
       
View Full Code Here

TOP

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

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.