Replies: 2 comments 2 replies
-
Hello @asghar13 ! Thank you for trying choice-learn and reaching out. The issue should be fixed in the branch fix-tol-lcmodel. |
Beta Was this translation helpful? Give feedback.
-
Hello @asghar13, |
Beta Was this translation helpful? Give feedback.
-
Hi, hope you are well,
I ran ''lc_model = LatentClassSimpleMNL(n_latent_classes=3, fit_method="mle", optimizer="lbfgs", epochs=1000, tolerance=1e-20)
hist, results = lc_model.fit(elec_dataset, verbose=1)''
in your sample in https://colab.research.google.com/github/artefactory/choice-learn/blob/main/notebooks/models/latent_class_model.ipynb#scrollTo=F57NWfxAYp9b
but I got the error of
''
TypeError Traceback (most recent call last)
in <cell line: 2>()
1 lc_model = LatentClassSimpleMNL(n_latent_classes=3, fit_method="mle", optimizer="lbfgs", epochs=1000, tolerance=1e-20)
----> 2 hist, results = lc_model.fit(elec_dataset, verbose=1)
3 frames
/usr/local/lib/python3.10/dist-packages/choice_learn/models/simple_mnl.py in init(self, add_exit_choice, intercept, optimizer, lr, **kwargs)
37 Learning Rate to be used with optimizer.
38 """
---> 39 super().init(add_exit_choice=add_exit_choice, optimizer=optimizer, lr=lr, **kwargs)
40 self.instantiated = False
41 self.intercept = intercept
TypeError: ChoiceModel.init() got an unexpected keyword argument 'tolerance'
''
I know the part of '' ---> 39 super().init(add_exit_choice=add_exit_choice, optimizer=optimizer, lr=lr, **kwargs)
40 self.instantiated = False
41 self.intercept = intercept''
is related to the SimpleMNL, but I got the similar problem for my own dataset also.
I would be grateful for any help to solve the problem
Beta Was this translation helpful? Give feedback.
All reactions