ee27c11166d39aafb9bf6196a037346c73ed2ae6,Orange/preprocess/transformation.py,Transformation,__call__,#Transformation#Any#,19

Before Change


            self.attr_index = data.domain.index(self.variable)
        if isinstance(data, Instance):
            return self.transform(np.array([float(data[self.attr_index])]))[0]
        elif isinstance(data, Table):
            return self.transform(data.get_column_view(self.attr_index)[0])
        else:
            raise TypeError("{} is not an Instance or a Table.".format(data))

    def transform(self, c):
        
        Return the transformed value of the argument `c`, which can be a number

After Change


            data = np.array([float(data[self.attr_index])])
        else:
            data = data.get_column_view(self.attr_index)[0]
        transformed = self.transform(data)
        if inst and isinstance(transformed, np.ndarray):
            transformed = transformed[0]
        return transformed
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: biolab/orange3
Commit Name: ee27c11166d39aafb9bf6196a037346c73ed2ae6
Time: 2015-02-20
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 37f1544cb19794294029aa64e7b119b69ef09f51
Time: 2018-11-20
Author: contact@againstthecurrent.ch
File Name: category_encoders/target_encoder.py
Class Name: TargetEncoder
Method Name: transform


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 1a2462f18707e04f294224053473668820111cf5
Time: 2017-07-23
Author: carlo.deramo@gmail.com
File Name: PyPi/approximators/regressor.py
Class Name: Regressor
Method Name: predict