d835c2656618fe0d227c7eb15eecb4847e8b6475,lazyflow/operators/obsolete/classifierOperators.py,OpPredictRandomForest,execute,#OpPredictRandomForest#Any#Any#Any#,211

Before Change



        shape=res.shape
        prod = 1
        for i,e in enumerate(shape):
            if i < len(shape) - 1:
                prod *= e

        features=res.reshape(prod, shape[-1])

        prediction=RF.predictProbabilities(features.astype(numpy.float32))

After Change


        // If our LabelsCount is higher than the number of labels in the training set,
        // then our results aren"t really valid.
        // Duplicate the last label"s predictions
        chanslice = slice(min(key[-1].start, RF.labelCount()-1), min(key[-1].stop, RF.labelCount()))
        result[...]=prediction[...,chanslice]*255 // FIXME: This assumes that channel is the last axis


Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: ilastik/ilastik
Commit Name: d835c2656618fe0d227c7eb15eecb4847e8b6475
Time: 2012-07-02
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/obsolete/classifierOperators.py
Class Name: OpPredictRandomForest
Method Name: execute


Project Name: IndicoDataSolutions/Enso
Commit Name: 7f46b2274cb8958441b1236e8fd7ac39d546a732
Time: 2017-12-13
Author: maritza@mylestone.com
File Name: enso/sample/__init__.py
Class Name: KCenter
Method Name: sample


Project Name: deepchem/deepchem
Commit Name: b83aeb11f157d41805114f1b58e65c172a67c6f0
Time: 2017-08-21
Author: proteneer@gmail.com
File Name: deepchem/trans/transformers.py
Class Name: ANITransformer
Method Name: transform_array