Class ClusterSampleIterator

    • Constructor Detail

      • ClusterSampleIterator

        public ClusterSampleIterator​(Clustering clustering,
                                     Randoms random,
                                     double positiveProportion,
                                     int numberSamples)
        Parameters:
        clustering - True clustering.
        random - Source of randomness.
        positiveProportion - Proportion of Instances that should be positive examples.
        numberSamples - Total number of samples to generate.
    • Method Detail

      • sampleFromArray

        protected int[] sampleFromArray​(int[] a,
                                        Randoms random,
                                        int minSize)
        Samples a subset of elements from this array.
        Parameters:
        a -
        random -
        Returns:
      • sampleSplitFromArray

        protected int[][] sampleSplitFromArray​(int[] a,
                                               Randoms random,
                                               int minSize)
        Samples a two disjoint subset of elements from this array.
        Parameters:
        a -
        random -
        Returns: