Examples of calculateScore()


Examples of com.heatonresearch.aifh.learning.score.ScoreFunction.calculateScore()

            train.iteration();

            RBFNetwork best = (RBFNetwork) train.getBestParticle();

            double trainingScore = train.getLastError();
            double validationScore = scoreValidate.calculateScore(best);

            if (validationScore > bestScore) {
                System.arraycopy(best.getLongTermMemory(), 0, this.bestNetwork.getLongTermMemory(), 0, best.getLongTermMemory().length);
                this.bestScore = validationScore;
            }
View Full Code Here

Examples of net.sourceforge.align.calculator.Calculator.calculateScore()

  @Test
  public void calculate() {
    List<Calculator> calculatorList = Arrays.asList(new Calculator[] {
        new CalculatorMock(0.5f), new CalculatorMock(0.25f)});
    Calculator calculator = new CompositeCalculator(calculatorList);
    assertEquals(0.75f, calculator.calculateScore(null, null), 0.75f);
  }
 
}
View Full Code Here

Examples of org.drools.planner.core.bruteforce.scope.BruteForceSolverPhaseScope.calculateScore()

        BruteForceStepScope stepScope = createNextStepScope(bruteForceSolverPhaseScope, null);
        while (!termination.isPhaseTerminated(bruteForceSolverPhaseScope) && bruteForceEntityWalker.hasWalk()) {
            stepStarted(stepScope);
            bruteForceEntityWalker.walk();
            Score score = bruteForceSolverPhaseScope.calculateScore();
            stepScope.setScore(score);
            stepEnded(stepScope);
            stepScope = createNextStepScope(bruteForceSolverPhaseScope, stepScope);
        }
        phaseEnded(bruteForceSolverPhaseScope);
View Full Code Here

Examples of org.drools.planner.core.constructionheuristic.greedyFit.GreedyFitSolverPhaseScope.calculateScore()

        processMove(moveScope);
        undoMove.doMove(scoreDirector);
        if (assertUndoMoveIsUncorrupted) {
            GreedyFitSolverPhaseScope greedyFitSolverPhaseScope = moveScope.getGreedyFitStepScope()
                    .getGreedyFitSolverPhaseScope();
            Score undoScore = greedyFitSolverPhaseScope.calculateScore();
            Score lastCompletedStepScore = greedyFitSolverPhaseScope.getLastCompletedStepScope().getScore();
            if (!undoScore.equals(lastCompletedStepScore)) {
                // First assert that are probably no corrupted score rules.
                greedyFitSolverPhaseScope.getSolverScope().getScoreDirector()
                        .assertWorkingScore(undoScore);
View Full Code Here

Examples of org.drools.planner.core.constructionheuristic.greedyFit.scope.GreedyFitSolverPhaseScope.calculateScore()

        processMove(moveScope);
        undoMove.doMove(scoreDirector);
        if (assertUndoMoveIsUncorrupted) {
            GreedyFitSolverPhaseScope greedyFitSolverPhaseScope = moveScope.getGreedyFitStepScope()
                    .getPhaseScope();
            Score undoScore = greedyFitSolverPhaseScope.calculateScore();
            Score lastCompletedStepScore = greedyFitSolverPhaseScope.getLastCompletedStepScope().getScore();
            if (!undoScore.equals(lastCompletedStepScore)) {
                // First assert that are probably no corrupted score rules.
                greedyFitSolverPhaseScope.getSolverScope().getScoreDirector()
                        .assertWorkingScore(undoScore);
View Full Code Here

Examples of org.drools.planner.core.localsearch.LocalSearchSolverPhaseScope.calculateScore()

        processMove(moveScope);
        undoMove.doMove(scoreDirector);
        if (assertUndoMoveIsUncorrupted) {
            LocalSearchSolverPhaseScope localSearchSolverPhaseScope = moveScope.getLocalSearchStepScope()
                    .getLocalSearchSolverPhaseScope();
            Score undoScore = localSearchSolverPhaseScope.calculateScore();
            Score lastCompletedStepScore = localSearchSolverPhaseScope.getLastCompletedStepScope().getScore();
            if (!undoScore.equals(lastCompletedStepScore)) {
                // First assert that are probably no corrupted score rules.
                scoreDirector.assertWorkingScore(undoScore);
                throw new IllegalStateException(
View Full Code Here

Examples of org.drools.planner.core.phase.custom.scope.CustomSolverPhaseScope.calculateScore()

        Iterator<CustomSolverPhaseCommand> commandIterator = customSolverPhaseCommandList.iterator();
        while (!termination.isPhaseTerminated(customSolverPhaseScope) && commandIterator.hasNext()) {
            CustomSolverPhaseCommand customSolverPhaseCommand = commandIterator.next();
            stepStarted(stepScope);
            customSolverPhaseCommand.changeWorkingSolution(solverScope.getScoreDirector());
            Score score = customSolverPhaseScope.calculateScore();
            stepScope.setScore(score);
            stepEnded(stepScope);
            stepScope = createNextStepScope(customSolverPhaseScope, stepScope);
        }
        phaseEnded(customSolverPhaseScope);
View Full Code Here

Examples of org.drools.planner.core.score.calculator.ScoreCalculator.calculateScore()

        tmpWorkingMemory.setGlobal(GLOBAL_SCORE_CALCULATOR_KEY, tmpScoreCalculator);
        for (Object fact : workingSolution.getFacts()) {
            tmpWorkingMemory.insert(fact);
        }
        tmpWorkingMemory.fireAllRules();
        Score realScore = tmpScoreCalculator.calculateScore();
        tmpWorkingMemory.dispose();
        if (!presumedScore.equals(realScore)) {
            throw new IllegalStateException(
                    "The presumedScore (" + presumedScore + ") is corrupted because it is not the realScore  ("
                            + realScore + ").\n"
View Full Code Here

Examples of org.drools.planner.core.score.calculator.ScoreCalculator.calculateScore()

        tmpWorkingMemory.setGlobal(GLOBAL_SCORE_CALCULATOR_KEY, tmpScoreCalculator);
        for (Object fact : workingSolution.getFacts()) {
            tmpWorkingMemory.insert(fact);
        }
        tmpWorkingMemory.fireAllRules();
        Score realScore = tmpScoreCalculator.calculateScore();
        tmpWorkingMemory.dispose();
        if (!presumedScore.equals(realScore)) {
            throw new IllegalStateException(
                    "The presumedScore (" + presumedScore + ") is corrupted because it is not the realScore  ("
                            + realScore + ").\n"
View Full Code Here

Examples of org.drools.planner.core.score.calculator.ScoreCalculator.calculateScore()

        tmpWorkingMemory.setGlobal(GLOBAL_SCORE_CALCULATOR_KEY, tmpScoreCalculator);
        for (Object fact : getWorkingFacts()) {
            tmpWorkingMemory.insert(fact);
        }
        tmpWorkingMemory.fireAllRules();
        Score realScore = tmpScoreCalculator.calculateScore();
        tmpWorkingMemory.dispose();
        if (!presumedScore.equals(realScore)) {
            throw new IllegalStateException(
                    "The presumedScore (" + presumedScore + ") is corrupted because it is not the realScore  ("
                            + realScore + ").\n"
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.