mirror of
https://github.com/twitter/the-algorithm.git
synced 2025-01-05 00:51:55 +01:00
Compare commits
2 Commits
16b4a8c3ad
...
4e7a28ce7e
Author | SHA1 | Date | |
---|---|---|---|
|
4e7a28ce7e | ||
|
0a623bcb89 |
@ -178,7 +178,7 @@ case object InnerProduct
|
|||||||
Success(InnerProductDistance(cosineDistance.distance.toFloat))
|
Success(InnerProductDistance(cosineDistance.distance.toFloat))
|
||||||
case distance =>
|
case distance =>
|
||||||
Failure(
|
Failure(
|
||||||
new IllegalArgumentException(s"Expected a inner product distance but got $distance")
|
new IllegalArgumentException(s"Expected an inner product distance but got $distance")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ case object Edit extends Metric[EditDistance] with Injection[EditDistance, Servi
|
|||||||
Success(EditDistance(cosineDistance.distance.toFloat))
|
Success(EditDistance(cosineDistance.distance.toFloat))
|
||||||
case distance =>
|
case distance =>
|
||||||
Failure(
|
Failure(
|
||||||
new IllegalArgumentException(s"Expected a inner product distance but got $distance")
|
new IllegalArgumentException(s"Expected an inner product distance but got $distance")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user