Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiM runs into an exception when using the option only_global=False #118

Open
phyk opened this issue Dec 15, 2023 · 3 comments
Open

LiM runs into an exception when using the option only_global=False #118

phyk opened this issue Dec 15, 2023 · 3 comments

Comments

@phyk
Copy link

phyk commented Dec 15, 2023

When using the LiM implementation, I run it on larger datasets and everything works, as long as I don't use the option only_global=False. Whenever it is set, I get the following message:
ValueError: Unknown label type: continuous. Maybe you are trying to fit a classifier, which expects discrete classes on a regression target with continuous values.
In case of running it on with only_global=True, everything works. I checked my data and from what I can see, I correctly define the discrete_indicator to contain all discrete features.

Can you help me out here?

@YanaZeng
Copy link
Collaborator

It looks like the error was from the local search procedure, especially from the calculation from the "_loss" function or the "_bic_scoring" function. Maybe you could debug the code to see if there is anything strange.

Thanks for your interest! If any problems, please let us know.

@phyk
Copy link
Author

phyk commented Dec 21, 2023

I found the error on my end, i miscalculated the discrete_indicator array (indicating continuous instead of binary columns).

When investigating the issue another question arose: is the discrete_indicator field ignored in case the parameter only_global is set to True?

@YanaZeng
Copy link
Collaborator

YanaZeng commented Dec 22, 2023

In the case where the parameter only_global is set to True, the discrete_indicator field is used as well. It is used to compute the objective function. If you miscalculated the discrete_indicator array, the code can work but might not work well, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants