(self, attributes, x, n_vals)
return ManhattanColumnsModel(
            attributes, self.impute, self.normalize, medians, mads,
            self.callback)
Return `ManhattanColumnsModel` with stored medians and MADs
        for normalization and imputation.
Return `ManhattanColumnsModel` with stored medians and MADs
        for normalization and imputation.
Return ManhattanColumnsModel with stored medians and MADs for normalization and imputation .
def fit_cols(self, attributes, x, n_vals):
        """
        Return `ManhattanColumnsModel` with stored medians and MADs
        for normalization and imputation.
        """
        self.check_no_discrete(n_vals)
        if x.size == 0:
            medians = np.zeros(len(x))
            mads = np.zeros(len(x))
        else:
            medians = np.nanmedian(x, axis=0)
            mads = np.nanmedian(np.abs(x - medians), axis=0)
        if self.normalize and (np.isnan(mads).any() or not mads.all()):
            raise ValueError(
                "some columns have zero absolute distance from median, "
                "or no values")
        return ManhattanColumnsModel(
            attributes, self.impute, self.normalize, medians, mads,
            self.callback)
def fit_cols ( self , attributes , x , n_vals ) : self . check_no_discrete ( n_vals ) if x . size == 0 : medians = np . zeros ( len ( x ) ) mads = np . zeros ( len ( x ) ) else : medians = np . nanmedian ( x , axis = 0 ) mads = np . nanmedian ( np . abs ( x - medians ) , axis = 0 ) if self . normalize and ( np . isnan ( mads ) . any ( ) or not mads . all ( ) ) : raise ValueError ( "some columns have zero absolute distance from median, " "or no values" ) return ManhattanColumnsModel ( attributes , self . impute , self . normalize , medians , mads , self . callback )