def test_get_lr():
    # Tests that the likelihood ratio values are not empty for extreme values and are realistic.
    ctx = create_cts_test_ctx()
    r = SimilarityRecommender(ctx)
    assert r.get_lr(0.0001) is not None
    assert r.get_lr(10.0) is not None
    assert r.get_lr(0.001) > r.get_lr(5.0)
def test_get_lr(test_ctx):
    # Tests that the likelihood ratio values are not empty for extreme values and are realistic.
    ctx = install_continuous_data(test_ctx)
    r = SimilarityRecommender(ctx)
    assert r.get_lr(0.0001) is not None
    assert r.get_lr(10.0) is not None
    assert r.get_lr(0.001) > r.get_lr(5.0)
def test_get_lr(test_ctx):
    # Tests that the likelihood ratio values are not empty for extreme values and are realistic.
    with mock_install_continuous_data(test_ctx):
        r = SimilarityRecommender(test_ctx)
        cache = r._get_cache({})
        assert r.get_lr(0.0001, cache) is not None
        assert r.get_lr(10.0, cache) is not None
        assert r.get_lr(0.001, cache) > r.get_lr(5.0, cache)
Beispiel #4
0
def test_get_lr(instantiate_mocked_s3_bucket):
    # Tests that the likelihood ratio values are not empty for extreme values and are realistic.
    r = SimilarityRecommender()
    assert r.get_lr(0.0001) is not None
    assert r.get_lr(10.0) is not None
    assert r.get_lr(0.001) > r.get_lr(5.0)
def test_get_lr(mock_s3_continuous_data):
    # Tests that the likelihood ratio values are not empty for extreme values and are realistic.
    r = SimilarityRecommender()
    assert r.get_lr(0.0001) is not None
    assert r.get_lr(10.0) is not None
    assert r.get_lr(0.001) > r.get_lr(5.0)