Create convenience constructor for the Transforms (workitem related to #371)
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.)
@TomFinley, can you please comment on what would be the best way to move forward for all the three cases above?
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.