Skip to content

Commit

Permalink
ADD: reg in fit_lbfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAuriau committed Sep 25, 2024
1 parent 996f446 commit 26bf937
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit_tests/models/test_simplemnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ def test_simplemnl_instantiation():
def test_fit_lbfgs():
"""Tests instantiation with item-full and fit with lbfgs."""
tf.config.run_functions_eagerly(True)
model = SimpleMNL(intercept="item-full", optimizer="lbfgs", epochs=20)
model = SimpleMNL(
intercept="item-full",
optimizer="lbfgs",
epochs=20,
regularization="l2",
regularization_strength=0.01,
)
model.instantiate(n_items=3, n_items_features=2, n_shared_features=3)
nll_b = model.evaluate(test_dataset)
model.fit(test_dataset, get_report=True)
Expand Down

0 comments on commit 26bf937

Please sign in to comment.