h2o-py/h2o/frame.py
def strdistance(self, y, measure=None, compare_empty=True):
        """
        Compute element-wise string distances between two H2OFrames. Both frames need to have the same
        shape and only contain string/factor columns.

        :param H2OFrame y: A comparison frame.
        :param str measure: A string identifier indicating what string distance measure to use. Must be one of:

            - ``"lv"``:        Levenshtein distance
            - ``"lcs"``:       Longest common substring distance
            - ``"qgram"``:     q-gram distance
            - ``"jaccard"``:   Jaccard distance between q-gram profiles
            - ``"jw"``:        Jaro, or Jaro-Winker distance
            - ``"soundex"``:   Distance based on soundex encoding

        :param compare_empty if set to FALSE, empty strings will be handled as NaNs

        :examples:
          >>>
          >>> x = h2o.H2OFrame.from_python(['Martha', 'Dwayne', 'Dixon'], column_types=['factor'])
          >>> y = h2o.H2OFrame.from_python(['Marhta', 'Duane', 'Dicksonx'], column_types=['string'])
          >>> x.strdistance(y, measure="jw")

        :returns: An H2OFrame of the matrix containing element-wise distance between the
            strings of this frame and ``y``. The returned frame has the same shape as the input frames.
        """
        assert_is_type(y, H2OFrame)
        assert_is_type(measure, Enum('lv', 'lcs', 'qgram', 'jaccard', 'jw', 'soundex'))
        assert_is_type(compare_empty, bool)
        return H2OFrame._expr(expr=ExprNode("strDistance", self, y, measure, compare_empty))._frame()
def strdistance(self, y, measure=None, compare_empty=True):
        """
        Compute element-wise string distances between two H2OFrames. Both frames need to have the same
        shape and only contain string/factor columns.

        :param H2OFrame y: A comparison frame.
        :param str measure: A string identifier indicating what string distance measure to use. Must be one of:

            - ``"lv"``:        Levenshtein distance
            - ``"lcs"``:       Longest common substring distance
            - ``"qgram"``:     q-gram distance
            - ``"jaccard"``:   Jaccard distance between q-gram profiles
            - ``"jw"``:        Jaro, or Jaro-Winker distance
            - ``"soundex"``:   Distance based on soundex encoding

        :param compare_empty if set to FALSE, empty strings will be handled as NaNs

        :examples:
          >>>
          >>> x = h2o.H2OFrame.from_python(['Martha', 'Dwayne', 'Dixon'], column_types=['factor'])
          >>> y = h2o.H2OFrame.from_python(['Marhta', 'Duane', 'Dicksonx'], column_types=['string'])
          >>> x.strdistance(y, measure="jw")

        :returns: An H2OFrame of the matrix containing element-wise distance between the
            strings of this frame and ``y``. The returned frame has the same shape as the input frames.
        """
        assert_is_type(y, H2OFrame)
        assert_is_type(measure, Enum('lv', 'lcs', 'qgram', 'jaccard', 'jw', 'soundex'))
        assert_is_type(compare_empty, bool)
        return H2OFrame._expr(expr=ExprNode("strDistance", self, y, measure, compare_empty))._frame()
def strdistance ( self , y , measure = None , compare_empty = True ) : assert_is_type ( y , H2OFrame ) assert_is_type ( measure , Enum ( 'lv' , 'lcs' , 'qgram' , 'jaccard' , 'jw' , 'soundex' ) ) assert_is_type ( compare_empty , bool ) return H2OFrame . _expr ( expr = ExprNode ( "strDistance" , self , y , measure , compare_empty ) ) . _frame ( )
Compute element-wise string distances between two H2OFrames. Both frames need to have the same
        shape and only contain string/factor columns.

        :param H2OFrame y: A comparison frame.
        :param str measure: A string identifier indicating what string distance measure to use. Must be one of:

            - ``"lv"``:        Levenshtein distance
            - ``"lcs"``:       Longest common substring distance
            - ``"qgram"``:     q-gram distance
            - ``"jaccard"``:   Jaccard distance between q-gram profiles
            - ``"jw"``:        Jaro, or Jaro-Winker distance
            - ``"soundex"``:   Distance based on soundex encoding

        :param compare_empty if set to FALSE, empty strings will be handled as NaNs

        :examples:
          >>>
          >>> x = h2o.H2OFrame.from_python(['Martha', 'Dwayne', 'Dixon'], column_types=['factor'])
          >>> y = h2o.H2OFrame.from_python(['Marhta', 'Duane', 'Dicksonx'], column_types=['string'])
          >>> x.strdistance(y, measure="jw")

        :returns: An H2OFrame of the matrix containing element-wise distance between the
            strings of this frame and ``y``. The returned frame has the same shape as the input frames.
Compute element - wise string distances between two H2OFrames . Both frames need to have the same shape and only contain string / factor columns .