Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
bob.bio.base
bob.bio.base
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • bob
  • bob.bio.basebob.bio.base
  • Issues
  • #143

Closed
Open
Opened Nov 04, 2020 by Amir MOHAMMADI@amohammadi
  • Report abuse
  • New issue
Report abuse New issue

Adding tags to transformers to differentiate between annotators, preprocessors, and extractors.

I think while it was a good idea to use scikit-learn's transformers API for our classes, still there are some differences between the transformers that we implement. I suggest adding tags to our transformers (https://scikit-learn.org/stable/developers/develop.html#estimator-tags) to be able to programmatically differentiate them. For example, we can have:

class Preprocessor(BaseEstimator):

    def _more_tags(self):
        return {'bob_transformer': 'preprocessor'}

that would allow:

preprocessor = wrap(["sample"], preprocessor)

to implicitly imply:

transform_extra_arguments = (("annotations", "annotations"),)
preprocessor = wrap(["sample"], preprocessor, transform_extra_arguments=transform_extra_arguments)

Or wrapping an annotator would imply sample.annotations = annotator(sample.data) instead of the usual sample.data = transformer(sample.data).

What do you think? Does it make sense?

Edited Nov 04, 2020 by Amir MOHAMMADI
Assignee
Assign to
Bob 9.0.0
Milestone
Bob 9.0.0
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: bob/bob.bio.base#143