test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/entropy/EntropySketchTest.java
test_class.identifier: EntropySketchTest
test_case.body: @Test
      public void testEntropy() {
          System.out.println("entropy");
          EntropySketch sketch = new EntropySketch(10);
          EntropyExact exact = new EntropyExact();
          
          String s = "hello";
          
          sketch.push(s.getBytes(), 1);
          exact.push(s.getBytes(), 1);
          
          System.out.println("Estimate: " + sketch.entropy());
          System.out.println("Exact: " + exact.entropy());
      }
test_case.class_method_signature: EntropySketchTest.testEntropy()
test_case.full_signature: @Test public void testEntropy()
test_case.identifier: testEntropy
test_case.invocations: println push getBytes push getBytes println entropy println entropy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEntropy()
focal_class.declarator: count
focal_class.modifier: private
focal_class.original_string: private int count;
focal_class.type: int
focal_class.var_name: count
focal_class.declarator: data
focal_class.modifier: private
focal_class.original_string: private double[] data;
focal_class.type: double[]
focal_class.var_name: data
focal_class.declarator: hasher
focal_class.modifier: private final
focal_class.original_string: private final Hash hasher;
focal_class.type: Hash
focal_class.var_name: hasher
focal_class.declarator: seed
focal_class.modifier: private
focal_class.original_string: private long seed;
focal_class.type: long
focal_class.var_name: seed
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/entropy/EntropySketch.java
focal_class.identifier: EntropySketch
focal_class.interfaces: implements IEntropy
focal_class.class_method_signature: EntropySketch.EntropySketch(int k)
focal_class.full_signature: public  EntropySketch(int k)
focal_class.identifier: EntropySketch
focal_class.modifiers: public
focal_class.parameters: (int k)
focal_class.signature:  EntropySketch(int k)
focal_class.class_method_signature: EntropySketch.EntropySketch(int k, long seed)
focal_class.full_signature: public  EntropySketch(int k, long seed)
focal_class.identifier: EntropySketch
focal_class.modifiers: public
focal_class.parameters: (int k, long seed)
focal_class.signature:  EntropySketch(int k, long seed)
focal_class.class_method_signature: EntropySketch.EntropySketch(int k, long seed, Hash hasher)
focal_class.full_signature: public  EntropySketch(int k, long seed, Hash hasher)
focal_class.identifier: EntropySketch
focal_class.modifiers: public
focal_class.parameters: (int k, long seed, Hash hasher)
focal_class.signature:  EntropySketch(int k, long seed, Hash hasher)
focal_class.class_method_signature: EntropySketch.push(byte[] b, int inc)
focal_class.full_signature: public void push(byte[] b, int inc)
focal_class.identifier: push
focal_class.modifiers: public
focal_class.parameters: (byte[] b, int inc)
focal_class.return: void
focal_class.signature: void push(byte[] b, int inc)
focal_class.class_method_signature: EntropySketch.entropy()
focal_class.full_signature: public double entropy()
focal_class.identifier: entropy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double entropy()
focal_class.class_method_signature: EntropySketch.maxSkew(RandomGenerator r)
focal_class.full_signature: private double maxSkew(RandomGenerator r)
focal_class.identifier: maxSkew
focal_class.modifiers: private
focal_class.parameters: (RandomGenerator r)
focal_class.return: double
focal_class.signature: double maxSkew(RandomGenerator r)
focal_method.body: public double entropy() {
          double sum = 0.0;
          
          for (double d : data) {
              double tmp = d / (double)count;
              sum += Math.exp(tmp);
          }
          
          return -(Math.log(sum / (double)data.length) / Math.log(2));
      }
focal_method.class_method_signature: EntropySketch.entropy()
focal_method.full_signature: public double entropy()
focal_method.identifier: entropy
focal_method.invocations: exp log log
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: double
focal_method.signature: double entropy()