def vectors_difference(v1, v2, prefix=''):
    """ Given two mixed feature vectors, return another vector with the
	differences amongst them, taking the features of the first vector. For
	numerical features, absolute value difference is computed. For categorical
	features, Gower distance is used. """
    res = {}
    for feat in v1:
        if type(v1[feat]) == str:
            res[prefix + feat] = 0 if v1[feat] == v2[feat] else 1
        else:
            res[prefix + feat] = abs(v1[feat] - v2[feat])
    return res
