Package weka.classifiers.meta

Examples of weka.classifiers.meta.CostSensitiveClassifier


        smo.setBuildLogisticModels(isBuildLogisticModel());

        Classifier classifier = smo;

        if (useCostTraining) {
            CostSensitiveClassifier cost = new CostSensitiveClassifier();
            cost.setClassifier(smo);
            CostMatrix matrix = new CostMatrix(2);
            matrix.setElement(0, 0, 0);
            matrix.setElement(0, 1, falsePositiveCost);
            matrix.setElement(1, 0, falseNegativeCost);
            matrix.setElement(1, 1, 0);
            cost.setCostMatrix(matrix);

            classifier = cost;

            System.out.print("Wrapping SMO in CostSensitiveClassifier " + matrix.toMatlab());

            if (useReweighting) {
                cost.setMinimizeExpectedCost(false);
                System.out.println(" using re-weighting.");
            } else {
                cost.setMinimizeExpectedCost(true);
                System.out.println(" using min-cost criterion.");
            }
        }

        try {
View Full Code Here

TOP

Related Classes of weka.classifiers.meta.CostSensitiveClassifier

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.