File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
# ------------------------------------------------------------------
4
4
5
5
"""
6
- OneHot(col; categ=true )
6
+ OneHot(col; categ=false )
7
7
8
8
Transforms categorical column `col` into one-hot columns of levels
9
9
returned by the `levels` function of CategoricalArrays.jl.
@@ -16,7 +16,7 @@ columns to categorical arrays as opposed to boolean vectors.
16
16
OneHot(1)
17
17
OneHot(:a)
18
18
OneHot("a")
19
- OneHot("a", categ=false )
19
+ OneHot("a", categ=true )
20
20
```
21
21
"""
22
22
struct OneHot{S<: ColSpec } <: StatelessFeatureTransform
@@ -28,7 +28,7 @@ struct OneHot{S<:ColSpec} <: StatelessFeatureTransform
28
28
end
29
29
end
30
30
31
- OneHot (col; categ= true ) = OneHot (col, categ)
31
+ OneHot (col; categ= false ) = OneHot (col, categ)
32
32
33
33
assertions (transform:: OneHot ) = [SciTypeAssertion {Finite} (transform. colspec)]
34
34
Original file line number Diff line number Diff line change 200
200
201
201
# compact mode
202
202
iostr = sprint (show, T)
203
- @test iostr == " OneHot([:a], true )"
203
+ @test iostr == " OneHot([:a], false )"
204
204
205
205
# full mode
206
206
iostr = sprint (show, MIME (" text/plain" ), T)
207
207
@test iostr == """
208
208
OneHot transform
209
209
├─ colspec = [:a]
210
- └─ categ = true """
210
+ └─ categ = false """
211
211
end
212
212
213
213
@testset " Identity" begin
You can’t perform that action at this time.
0 commit comments