mlpy.knowledgerep.cbr.features.StringFeature.compare

StringFeature.compare(other)[source]

Compare this feature to another feature.

The strings are compared directly and receive a similarity measure of 1 if they are the same, 0 otherwise.

Parameters:

other : Feature

The other feature to compare this feature to.

Returns:

float :

The similarity metric.