### Question:
AverageByNetworkCalculator extends AbstractNetworkWeightCalculator { protected static FeatureWeightMap average(FeatureList features) { FeatureWeightMap weightMap = new FeatureWeightMap(); int n = features.size(); if (features.hasBias()) { n = n - 1; } double weight = 1.0d / n; for (Feature feature: features) { if (feature.getType() != NetworkType.BIAS) { weightMap.put(feature, weight); } } return weightMap; } AverageByNetworkCalculator(String namespace, DataCache cache, Collection<Collection<Long>> networkIds, 
    		Collection<Long> attributeGroupIds, long organismId, Vector label, int attributesLimit, ProgressReporter progress); void process(); @Override String getParameterKey(); static final String PARAM_KEY_FORMAT; }### Answer:
@Test public void testAverage() { System.out.println("average"); Map<Integer, Long> IndexToNetworkMap = new HashMap<Integer, Long>(); for (int i=0; i<config.getOrg1NetworkIds().length; i++) { IndexToNetworkMap.put(i, config.getOrg1NetworkIds()[i]); } Map<Long, Double> result = AverageByNetworkCalculator.averageNetworksOnly(IndexToNetworkMap); assertNotNull(result); assertEquals(config.getOrg1NetworkIds().length, result.size()); for (Double weight: result.values()) { assertEquals(1d/config.getOrg1NetworkIds().length, weight, .000001d); } }