Skip to content

Create convenience constructor for the Transforms (workitem related to #371) #380

Closed

Description

@zeahmed

This work item is related to the new API proposal #371

Following is the initial list of transforms that will be implemented to gather feedback.

  • BootstrapSampleTransform
  • CategoricalHashTransform
  • CategoricalTransform
  • ConcatTransform
  • CopyColumnsTransform
  • CountFeatureSelection
  • DropColumnsTransform
  • LpNormNormalizerTransform
  • NAFilter
  • NormalizeTransform

There are different ways to create a public facing API for these transforms based on their class definition.

Add Convenience constructor directly to the transform class.

It is only possible for following type of transforms.

  • BootstrapSampleTransform
  • ConcatTransform
  • NAFilter

Add Create method (a helper method) for transforms that have Create method already implemented.

This is possible for following transforms.

  • CategoricalHashTransform
  • CategoricalTransform
  • CopyColumnsTransform
  • CountFeatureSelection

Add CreateX method (a helper method) for all possible use case of a transform where X is the name of the operation.

This is because one transform can instantiated for multiple purpose based on the argument e.g.

  • DropColumnTransform (can be instantiated for dropping or keeping columns)
  • LpNormNormalizerTransform (can be instantiated for LpNorm or GCNorm)
  • NormalizerTransform (can be instantiated for MinMax, Mean-Var, LogMean etc.)

Activity

  1. self-assigned this
    on Jun 20, 2018
  2. zeahmed commented on Jun 20, 2018

    @zeahmed
    ContributorAuthor

    @TomFinley, can you please comment on what would be the best way to move forward for all the three cases above?

  3. TomFinley commented on Jun 22, 2018

    @TomFinley
    Contributor

    HI @zeahmed , I think I generally like that plan at least to start. I feel like direct construction where possible is the best option, because that makes sense: you're instantiating a transform. The Create semantics are nice where possible as well. (Meta-transforms are what I see in this list, which makes sense.) And in cases where a transform can be instantiated with multiple argument classes (e.g., normalizers), then your plan for CreateX makes sense.

    Just my thoughts.

  4. added this to the 0718 milestone on Jun 28, 2018
  5. ghost locked as resolved and limited conversation to collaborators on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions