fe073644f6a8f37e9ce57df903bf12b560690fc3,lazyflow/operators/obsolete/classifierOperators.py,OpPredictRandomForest,execute,#OpPredictRandomForest#Any#Any#Any#,255

Before Change


            predictions[number] = forests[number].predictProbabilities(features.astype(numpy.float32))
        
        // predict the data with all the forests in parallel
        requests = []
        for i,f in enumerate(forests):
            req = Request(partial(predict_forest, i))
            req.submit()
            requests.append(req)


        for r in requests:
            r.wait()

        prediction=numpy.dstack(predictions)
        prediction = numpy.average(prediction, axis=2)

        prediction = prediction.reshape(*(shape[:-1] + (forests[0].labelCount(),)))

After Change


        t2 = time.time()

        // predict the data with all the forests in parallel
        pool = Pool()

        for i,f in enumerate(forests):
            req = pool.request(partial(predict_forest, i))

        pool.wait()

        prediction=numpy.dstack(predictions)
        prediction = numpy.average(prediction, axis=2)
        prediction.shape =  shape[:-1] + (forests[0].labelCount(),)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: ilastik/ilastik
Commit Name: fe073644f6a8f37e9ce57df903bf12b560690fc3
Time: 2012-09-14
Author: christoph.straehle@iwr.uni-heidelberg.de
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpPredictRandomForest
Method Name: execute


Project Name: ilastik/ilastik
Commit Name: fe073644f6a8f37e9ce57df903bf12b560690fc3
Time: 2012-09-14
Author: christoph.straehle@iwr.uni-heidelberg.de
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpTrainRandomForest
Method Name: getOutSlot


Project Name: ilastik/ilastik
Commit Name: fe073644f6a8f37e9ce57df903bf12b560690fc3
Time: 2012-09-14
Author: christoph.straehle@iwr.uni-heidelberg.de
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpTrainRandomForestBlocked
Method Name: execute