Package de.jungblut.partition

Examples of de.jungblut.partition.BlockPartitioner


      }
      particlePersonalBestCost[i] = f.evaluateCost(particlePositions[i])
          .getCost();
    }

    Set<Range> boundaries = new BlockPartitioner().partition(numThreads,
        numParticles).getBoundaries();

    // everything else will be seeded to the start position
    DoubleVector[] particlePersonalBestPositions = new DoubleVector[numParticles];
    Arrays.fill(particlePersonalBestPositions, pInput);
View Full Code Here


    List<TrainingSplit> splits = new ArrayList<>(classifier.length);
    if (shuffle) {
      ArrayUtils.multiShuffle(features, outcome);
    }

    List<Range> partitions = new ArrayList<>(new BlockPartitioner().partition(
        classifier.length, features.length).getBoundaries());

    final int[] splitRanges = new int[classifier.length + 1];
    for (int i = 1; i < classifier.length; i++) {
      splitRanges[i] = partitions.get(i).getStart();
View Full Code Here

    EvaluationResult averagedModel = new EvaluationResult();
    averagedModel.numLabels = numLabels;
    final int m = features.length;
    // compute the split ranges by blocks, so we have range from 0 to the next
    // partition index end that will be our testset, and so on.
    List<Range> partition = new ArrayList<>(new BlockPartitioner().partition(
        numFolds, m).getBoundaries());
    int[] splitRanges = new int[numFolds];
    for (int i = 1; i < numFolds; i++) {
      splitRanges[i] = partition.get(i).getEnd();
    }
View Full Code Here

TOP

Related Classes of de.jungblut.partition.BlockPartitioner

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.