Package com.ipeirotis.gal.scripts

Examples of com.ipeirotis.gal.scripts.DawidSkene


        Set<Category> categories = new HashSet<Category>();
        Category relevant = new Category("1");
        Category irrelevant = new Category("0");
        categories.add(relevant);
        categories.add(irrelevant);
        DawidSkene ds = new DawidSkene(categories);

        ds.addMisclassificationCost(new MisclassificationCost(relevant.getName(), relevant.getName(), 0.0));
        ds.addMisclassificationCost(new MisclassificationCost(irrelevant.getName(), irrelevant.getName(), 0.0));
        ds.addMisclassificationCost(new MisclassificationCost(relevant.getName(), irrelevant.getName(), 1.0));
        ds.addMisclassificationCost(new MisclassificationCost(irrelevant.getName(), relevant.getName(), 1.0));

        for (Vote vote : votes ) {
           if (vote.sequence <= threshold ) {
              AssignedLabel l = new AssignedLabel( vote.worker, vote.unit, vote.label);
              ds.addAssignedLabel(l);
            }
        }

        ds.estimate( 20 );
       
        return ds.getMajorityVote();
    }
View Full Code Here

TOP

Related Classes of com.ipeirotis.gal.scripts.DawidSkene

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.