}
assertEquals(origWeight, outWeight, TOLERANCE);
}
private void testDistributionSpread_X(double factor) throws Exception {
AttributeStats origs = m_Instances.attributeStats(1);
assertNotNull(origs.nominalCounts);
((SpreadSubsample)m_Filter).setDistributionSpread(factor);
Instances result = useFilter();
assertEquals(m_Instances.numAttributes(), result.numAttributes());
AttributeStats outs = result.attributeStats(1);
// Check distributions are pretty similar
assertNotNull(outs.nominalCounts);
assertEquals(origs.nominalCounts.length, outs.nominalCounts.length);
int min = outs.nominalCounts[0];