3
3
# ------------------------------------------------------------------
4
4
5
5
"""
6
- Learn(model, train , incols, outcols)
6
+ Learn(train, model , incols => outcols)
7
7
8
8
Fits the statistical learning `model` using the input columns, selected by `incols`,
9
9
and the output columns, selected by `outcols`, from the `train` table.
@@ -14,19 +14,19 @@ a collection of identifiers or a regular expression (regex).
14
14
# Examples
15
15
16
16
```julia
17
- Learn(model, train , [1, 2, 3], "d")
18
- Learn(model, train , [:a, :b, :c], :d)
19
- Learn(model, train , ["a", "b", "c"], 4)
20
- Learn(model, train , [1, 2, 3], [:d, :e])
21
- Learn(model, train , r"[abc]", ["d", "e"])
17
+ Learn(train, model , [1, 2, 3] => "d")
18
+ Learn(train, model , [:a, :b, :c] => :d)
19
+ Learn(train, model , ["a", "b", "c"] => 4)
20
+ Learn(train, model , [1, 2, 3] => [:d, :e])
21
+ Learn(train, model , r"[abc]" => ["d", "e"])
22
22
```
23
23
"""
24
24
struct Learn{M<: FittedModel } <: StatelessFeatureTransform
25
25
model:: M
26
26
input:: Vector{Symbol}
27
27
end
28
28
29
- function Learn (model, train, incols, outcols)
29
+ function Learn (train, model, ( incols, outcols) :: Pair )
30
30
if ! Tables. istable (train)
31
31
throw (ArgumentError (" training data must be a table" ))
32
32
end
0 commit comments