Skip to content

Plan to add pipeline? #99

@xiaodaigh

Description

@xiaodaigh

The below feels very boiler-platy

function FeatureTransforms.transform(data)
    # Define the Transforms we will apply
    p = Power(0.123)
    lc = LinearCombination([0.1, 0.9])
    ohe = OneHotEncoding(["type1", "type2", "type3"])

    features = deepcopy(data)
    FeatureTransforms.apply!(features, p; cols=[:a], header=[:a])
    features = FeatureTransforms.apply_append(features, lc; cols=[:a, :b], header=[:ab])
    features = FeatureTransforms.apply_append(features, ohe; cols=:types, header=[:type1, :type2, :type3])
end

What about something like

pipeline1 = @pipeline begin
   @transform! Power(0.123)
   @append LinearCombination([0.1, 0.9]) cols = [:a, :b] header = [:ab]
   @append OneHotEncoding(["type1", "type2", "type3"]) cols = :types header = [:type1, :type2, :type3]
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions