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

Make Selector work for target column #493

Open
mb706 opened this issue Sep 4, 2020 · 3 comments
Open

Make Selector work for target column #493

mb706 opened this issue Sep 4, 2020 · 3 comments
Labels
Status: Needs Design Needs some thought and design decisions.

Comments

@mb706
Copy link
Collaborator

mb706 commented Sep 4, 2020

Any ideas how we make Selectors work for the target column or columns of other roles? Some cases (e.g. PipeOpColRole, also #492) may want to select columns when they are the target.

One suggestion is to have a selector_role(), and possibly selector_target() because the target is special, and if more than just the target is wanted one could do selector_union(selector_target(), selector_xxx(...)).

But how to handle cases where one wants to select a specific subset of target columns?

  • Should the selectors we have so far get an extra argument only_features = TRUE?
  • Should there be a "modifier that changes a selector's view of a task (select_from_all_roles(selector_type("factor")))?
@mb706 mb706 added the Status: Needs Discussion We still need to think about what the solution should look like label Sep 4, 2020
@pfistfl
Copy link
Member

pfistfl commented Sep 4, 2020

+1 for selector_target.

Perhaps have selector_union() and selector_intersect().
Or just selector_combine(..., combine = "or" | "and")

I think the cases where this will become complicated are rather rare, and at some point, people instead would just write their own selectors.

@mb706
Copy link
Collaborator Author

mb706 commented Sep 4, 2020

selector_union and selector_intersect already exist. I am wondering about how to handle multitarget, or cases where one wants to do something to one (out of several) columns with other roles (e.g. weights or blocking)

@pfistfl
Copy link
Member

pfistfl commented Sep 4, 2020

Multi-target would then be e.g. selector_intersect(selector_target(...), selector_name(...))

I guess we could use a selector_role(...), which would perhaps handle weights etc.?
I mean for most other things, I think people should just write their selectors?
It might be a little hard to anticipate all use-cases.

If we want to benchmark e.g. multi-target settings or something, we might have to start and annotate col_roles somehow, as this would just lead to huge complexity in the selector API.

@mb706 mb706 added Status: Needs Design Needs some thought and design decisions. and removed Status: Needs Discussion We still need to think about what the solution should look like labels Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Design Needs some thought and design decisions.
Projects
None yet
Development

No branches or pull requests

2 participants