Example #1
0
    metricTableList = pool.map(getMetricTable,
      [groundTruthFiles[i_gt] for i_gt in gtIndices])

    pool.close()
    pool.join()

    print "Number of metric tables", len(metricTableList), \
      "with shape", metricTableList[0].shape

    for metricTable in metricTableList:
      print metricTable

    print "Aggregating rankings from metric tables"

    rankagg = UnsupervisedLearningRankAggregator()
    rankagg.aggregate(metricTableList, metricOrder)

    #averageWeights += rankagg.get_weights()
    w = rankagg.get_weights()

    #if t % 20 == 0:
    #  print "Weights", w
    print "Weights\n", w

    averageWeights += w

    print "Average weights after", t+1, "perturbations\n", averageWeights/(t+1)

  averageWeights /= numPerturbations

  print "--------------------"