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 33# ------------------------------------------------------------------
44
55"""
6- OneHot(col; categ=true )
6+ OneHot(col; categ=false )
77
88Transforms categorical column `col` into one-hot columns of levels
99returned by the `levels` function of CategoricalArrays.jl.
@@ -16,7 +16,7 @@ columns to categorical arrays as opposed to boolean vectors.
1616OneHot(1)
1717OneHot(:a)
1818OneHot("a")
19- OneHot("a", categ=false )
19+ OneHot("a", categ=true )
2020```
2121"""
2222struct OneHot{S<: ColSpec } <: StatelessFeatureTransform
@@ -28,7 +28,7 @@ struct OneHot{S<:ColSpec} <: StatelessFeatureTransform
2828 end
2929end
3030
31- OneHot (col; categ= true ) = OneHot (col, categ)
31+ OneHot (col; categ= false ) = OneHot (col, categ)
3232
3333assertions (transform:: OneHot ) = [SciTypeAssertion {Finite} (transform. colspec)]
3434
Original file line number Diff line number Diff line change 200200
201201 # compact mode
202202 iostr = sprint (show, T)
203- @test iostr == " OneHot([:a], true )"
203+ @test iostr == " OneHot([:a], false )"
204204
205205 # full mode
206206 iostr = sprint (show, MIME (" text/plain" ), T)
207207 @test iostr == """
208208 OneHot transform
209209 ├─ colspec = [:a]
210- └─ categ = true """
210+ └─ categ = false """
211211 end
212212
213213 @testset " Identity" begin
You can’t perform that action at this time.
0 commit comments