Skip to content

Commit

Permalink
changed biases in test_vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Daria Tikhonovich committed Dec 10, 2024
1 parent 01120e1 commit 5c412c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/models/test_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def setup_method(self) -> None:
[1, 10, 100],
]
)
user_biases = np.array([0, 1])
item_biases = np.array([0, 1, 3])
user_biases = np.array([2, 1])
item_biases = np.array([2, 1, 3])
self.user_factors = Factors(user_embeddings)
self.item_factors = Factors(item_embeddings)
self.user_biased_factors = Factors(user_embeddings, user_biases)
Expand Down Expand Up @@ -98,9 +98,9 @@ def test_without_biases(
@pytest.mark.parametrize(
"distance,expected_reco,expected_scores",
(
(Distance.DOT, [[2, 0, 1], [2, 1, 0]], [[299.0, 25.0, 7.0], [214.0, 7.0, 7.0]]),
(Distance.COSINE, [[0, 2, 1], [1, 2, 0]], [[1.0, 0.58877, 0.4899], [1.0, 0.86483, 0.4899]]),
(Distance.EUCLIDEAN, [[0, 1, 2], [1, 0, 2]], [[0.0, 4.3589, 97.68828], [0.0, 4.3589, 98.4378]]),
(Distance.DOT, [[2, 0, 1], [2, 0, 1]], [[301.0, 29.0, 9.0], [214.0, 9.0, 7.0]]),
(Distance.COSINE, [[0, 1, 2], [1, 2, 0]], [[1.0, 0.60648, 0.55774], [1.0, 0.86483, 0.60648]]),
(Distance.EUCLIDEAN, [[0, 1, 2], [1, 0, 2]], [[0.0, 4.3589, 97.64732], [0.0, 4.3589, 98.4378]]),
),
)
@pytest.mark.parametrize("method", ("u2i", "i2i"))
Expand Down

0 comments on commit 5c412c7

Please sign in to comment.