If time stamps are too far apart then similarity must be 0
This commit is contained in:
parent
ecf9cf96dd
commit
e5dc94afa9
|
@ -22,7 +22,7 @@ public class TimeStampMetric implements SimilarityMetric {
|
|||
if (t1 > 0 && t2 > 0) {
|
||||
float delta = Math.abs(t1 - t2);
|
||||
|
||||
return delta > epoch ? 1 : 1 - (delta / epoch);
|
||||
return delta > epoch ? 0 : 1 - (delta / epoch);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue