Documentation of 'edu.uci.jforests.sample.Sample' Java class
Sample
edu.uci.jforests.sample

Class Sample

  • Direct Known Subclasses:
    RankingSample


    public class Sample
    extends java.lang.Object
    • Field Detail

      • indicesInDataset

        public int[] indicesInDataset
      • weights

        public double[] weights
      • targets

        public double[] targets
      • size

        public int size
      • indicesInParentSample

        public int[] indicesInParentSample
    • Constructor Detail

      • Sample

        public Sample(Dataset dataset)
      • Sample

        public Sample(Dataset dataset,
                      int[] indicesInDataset,
                      double[] weights,
                      double[] targets,
                      int[] indicesInParentSample,
                      int size)
    • Method Detail

      • getClone

        public Sample getClone()
      • getRandomSubSample

        public Sample getRandomSubSample(double rate,
                                         java.util.Random rnd)
      • getRandomTargetBiasedSubSample

        public Sample getRandomTargetBiasedSubSample(double rate,
                                                     java.util.Random rnd)
        Returns a random subsample that is biased with respect to targets. In other words it tries to include items with more diverse targets
      • evaluate

        public double evaluate(double[] predictions,
                               EvaluationMetric evaluationMetric)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • evaluate

        public double evaluate(double[] predictions,
                               EvaluationMetric evaluationMetric,
                               double factor)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isEmpty

        public boolean isEmpty()
      • getOutOfSample

        public Sample getOutOfSample(Sample subSample)
        Creates a sample from instances that are in this sample and not in subSample

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.