h2o-py/h2o/targetencoder.py
def fit(self, frame = None):
        """
        Returns encoding map as an object that maps 'column_name' -> 'frame_with_encoding_map_for_this_column_name'

        :param frame frame: An H2OFrame object with which to create the target encoding map
        """
        self._teColumns = list(map(lambda i: frame.names[i], self._teColumns)) if all(isinstance(n, int) for n in self._teColumns) else self._teColumns
        self._responseColumnName = frame.names[self._responseColumnName] if isinstance(self._responseColumnName, int) else self._responseColumnName
        self._foldColumnName = frame.names[self._foldColumnName] if isinstance(self._foldColumnName, int) else self._foldColumnName
        
        self._encodingMap = ExprNode("target.encoder.fit", frame, self._teColumns, self._responseColumnName,
                                     self._foldColumnName)._eager_map_frame()

        return self._encodingMap
def fit(self, frame = None):
        """
        Returns encoding map as an object that maps 'column_name' -> 'frame_with_encoding_map_for_this_column_name'

        :param frame frame: An H2OFrame object with which to create the target encoding map
        """
        self._teColumns = list(map(lambda i: frame.names[i], self._teColumns)) if all(isinstance(n, int) for n in self._teColumns) else self._teColumns
        self._responseColumnName = frame.names[self._responseColumnName] if isinstance(self._responseColumnName, int) else self._responseColumnName
        self._foldColumnName = frame.names[self._foldColumnName] if isinstance(self._foldColumnName, int) else self._foldColumnName
        
        self._encodingMap = ExprNode("target.encoder.fit", frame, self._teColumns, self._responseColumnName,
                                     self._foldColumnName)._eager_map_frame()

        return self._encodingMap
def fit ( self , frame = None ) : self . _teColumns = list ( map ( lambda i : frame . names [ i ] , self . _teColumns ) ) if all ( isinstance ( n , int ) for n in self . _teColumns ) else self . _teColumns self . _responseColumnName = frame . names [ self . _responseColumnName ] if isinstance ( self . _responseColumnName , int ) else self . _responseColumnName self . _foldColumnName = frame . names [ self . _foldColumnName ] if isinstance ( self . _foldColumnName , int ) else self . _foldColumnName self . _encodingMap = ExprNode ( "target.encoder.fit" , frame , self . _teColumns , self . _responseColumnName , self . _foldColumnName ) . _eager_map_frame ( ) return self . _encodingMap
Returns encoding map as an object that maps 'column_name' -> 'frame_with_encoding_map_for_this_column_name'

        :param frame frame: An H2OFrame object with which to create the target encoding map
Returns encoding map as an object that maps column_name - > frame_with_encoding_map_for_this_column_name