File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ include("basefilters.jl")
14
14
using . BaseFilters
15
15
export OneHotEncoder
16
16
17
- include (" pipelines.jl" )
18
- using . Pipelines
19
- export @pipeline
20
- export @pipelinex
21
- export Pipeline, ComboPipeline
22
17
23
18
include (" featureselector.jl" )
24
19
using . FeatureSelectors
@@ -48,4 +43,10 @@ include("skcrossvalidator.jl")
48
43
using . SKCrossValidators
49
44
export crossvalidate
50
45
46
+ include (" pipelines.jl" )
47
+ using . Pipelines
48
+ export @pipeline
49
+ export @pipelinex
50
+ export Pipeline, ComboPipeline
51
+
51
52
end # module
Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ mutable struct FeatureSelector <: Transformer
42
42
end
43
43
end
44
44
45
- ```
45
+ """
46
46
FeatureSelector(cols::Vector{Int})
47
47
48
48
Helper function for FeatureSelector.
49
- ```
49
+ """
50
50
function FeatureSelector (cols:: Vector{Int} )
51
51
FeatureSelector (Dict (:columns => cols))
52
52
end
@@ -195,11 +195,11 @@ mutable struct CatNumDiscriminator <: Transformer
195
195
end
196
196
end
197
197
198
- ```
198
+ """
199
199
CatNumDiscriminator(maxcat::Int)
200
200
201
201
Helper function for CatNumDiscriminator.
202
- ```
202
+ """
203
203
function CatNumDiscriminator (maxcat:: Int )
204
204
CatNumDiscriminator (Dict (:maxcategories => maxcat))
205
205
end
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ using Random
6
6
using AutoMLPipeline. AbsTypes
7
7
using AutoMLPipeline. BaseFilters
8
8
using AutoMLPipeline. Utils
9
+ using AutoMLPipeline. EnsembleMethods: BestLearner
9
10
10
11
import AutoMLPipeline. AbsTypes: fit!, transform!
11
12
export fit!, transform!
@@ -189,6 +190,8 @@ function processexpr(args)
189
190
args[ndx] = :Pipeline
190
191
elseif args[ndx] == :+
191
192
args[ndx] = :ComboPipeline
193
+ elseif args[ndx] == :|
194
+ args[ndx] = :VoteEnsemble
192
195
end
193
196
end
194
197
return args
Original file line number Diff line number Diff line change @@ -52,8 +52,12 @@ function test_pipeline()
52
52
catf = CatFeatureSelector ()
53
53
numf = NumFeatureSelector ()
54
54
rf = RandomForest ()
55
+ ada = Adaboost ()
56
+ pt = PrunedTree ()
55
57
pcombo3 = @pipeline disc |> ((catf + numf) + (numf |> pca) + (numf |> ica) + (catf|> ohe)) |> rf
56
58
(fit_transform! (pcombo3,X,Y) .== Y) |> sum == 150
59
+ pcombo4 = @pipeline (numf |> pca) + (numf |> ica) |> (ada | rf | pt)
60
+ @test crossvalidate (pcombo4,X,Y). mean >= 0.90
57
61
end
58
62
@testset " Pipelines" begin
59
63
Random. seed! (123 )
You can’t perform that action at this time.
0 commit comments