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

Selection with pre-selected set #36

Open
M-A-Hassan opened this issue Oct 28, 2022 · 2 comments
Open

Selection with pre-selected set #36

M-A-Hassan opened this issue Oct 28, 2022 · 2 comments

Comments

@M-A-Hassan
Copy link

Hi,

Is there a way to pass a preselected set of data to the optimizer to be considered while calculating the gain?
The preselected set is user-defined input to the optimizer and will not be altered or modified in any way by the optimizer.

Thanks for the effort and making this package available.
Mohamed

@jmschrei
Copy link
Owner

Yes. Look at this argument in the functions: https://github.com/jmschrei/apricot/blob/master/apricot/functions/featureBased.py#L161

@MoH-assan
Copy link

Sorry for taking so long to reply.
Now I have tried it, but it seems that this way only works if your initial set is a subset of the data.
Please take a look at this:

elif self.initial_subset.ndim == 2:

When a try to pass a 2 dim array, as my initial set, this line of code raises the following value error:
ValueError: When using facility location, the initial subset must be a one dimensional array of indices.

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

3 participants