| 33 | public Iterable<BurstMap> sample = null; |
| 34 | |
| 35 | private static final class BSampler implements SerialObserver<BurstMap> { |
| 36 | public final VariableEncodings oldAdapter; |
| 37 | public final ResevoirSampler<BurstMap> sampler; |
| 38 | |
| 39 | public BSampler(final VariableEncodings oldAdapter, final long randSeed) { |
| 40 | this.oldAdapter = oldAdapter; |
| 41 | sampler = new ResevoirSampler<BurstMap>(100000,randSeed); |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public void observe(final BurstMap row) { |
| 46 | final double weight = oldAdapter.weight(row); |
| 47 | if(weight>0.0) { |
| 48 | final String resStr = row.getAsString(oldAdapter.def().resultColumn); |
| 49 | final int category = oldAdapter.category(resStr); |
| 50 | if(category>=0) { |
| 51 | sampler.observe(row); |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | |
| 58 |
nothing calls this directly
no outgoing calls
no test coverage detected