Package com.heatonresearch.aifh.learning

Examples of com.heatonresearch.aifh.learning.ClassificationAlgorithm


    @Override
    public double calculateScore(final MachineLearningAlgorithm algo) {
        int incorrectCount = 0;
        int totalCount = 0;

        final ClassificationAlgorithm ralgo = (ClassificationAlgorithm) algo;

        for (final BasicData aTrainingData : this.trainingData) {
            totalCount++;
            final int output = ralgo.computeClassification(aTrainingData.getInput());

            if (output != (int) aTrainingData.getIdeal()[0]) {
                incorrectCount++;
            }
        }
View Full Code Here


    @Override
    public double calculateScore(final MLMethod algo) {
        int incorrectCount = 0;
        int totalCount = 0;

        final ClassificationAlgorithm ralgo = (ClassificationAlgorithm) algo;

        for (final BasicData aTrainingData : this.trainingData) {
            totalCount++;
            final int output = ralgo.computeClassification(aTrainingData.getInput());

            if (output != (int) aTrainingData.getIdeal()[0]) {
                incorrectCount++;
            }
        }
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.learning.ClassificationAlgorithm

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.