Skip to content

Commit c17b5a5

Browse files
committed
✍🏻 Modify type docstring
1 parent 75418d4 commit c17b5a5

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

β€Žsrc/encoders/missingness_encoding/errors.jlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
UNSUPPORTED_COL_TYPE_ME(col_type) =
2-
"In MissingnessEncoder, elements have type $(col_type). The supported types are `Union{Char, AbstractString, Number}`"
2+
"In MissingnessEncoder, elements have type $(col_type). The supported types are `Char`, `AbstractString`, and `Number`"
33
VALID_TYPES_NEW_VAL_ME(possible_col_type) =
4-
"In MissingnessEncoder, label_for_missing keys have type $(possible_col_type). The supported types are `Union{Char, AbstractString, Number}`"
4+
"In MissingnessEncoder, label_for_missing keys have type $(possible_col_type). The supported types are `Char`, `AbstractString`, and `Number`"
55
COLLISION_NEW_VAL_ME(value) =
66
"In MissingnessEncoder, label_for_missing specifies new feature name $(value). However, this name already exists in one of the features. Please respecify label_for_missing."
77
UNSPECIFIED_COL_TYPE_ME(col_type, label_for_missing) =

β€Žsrc/encoders/missingness_encoding/interface_mlj.jlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $(MMI.doc_header(MissingnessEncoder))
8282
`MissingnessEncoder` maps any missing level of a categorical feature into a new level (e.g., "Missing").
8383
By this, missingness will be treated as a new
8484
level by any subsequent model. This assumes that the categorical features have raw
85-
types that are in `Union{Char, AbstractString, Number}`.
85+
types that are in `Char`, `AbstractString`, and `Number`.
8686
8787
# Training data
8888
@@ -104,7 +104,7 @@ Train the machine using `fit!(mach, rows=...)`.
104104
- `ignore=true`: Whether to exclude or includes the features given in `features`
105105
- `ordered_factor=false`: Whether to encode `OrderedFactor` or ignore them
106106
- `label_for_missing::Dict{<:Type, <:Any}()= Dict( AbstractString => "missing", Char => 'm', )`: A
107-
dictionary where the possible values for keys are the types in `Union{Char, AbstractString, Number}` and where each value
107+
dictionary where the possible values for keys are the types in `Char`, `AbstractString`, and `Number` and where each value
108108
signifies the new level to map into given a column raw super type. By default, if the raw type of the column subtypes `AbstractString`
109109
then missing values will be replaced with `"missing"` and if the raw type subtypes `Char` then the new value is `'m'`
110110
and if the raw type subtypes `Number` then the new value is the lowest value in the column - 1.

β€Žsrc/encoders/missingness_encoding/missingness_encoding.jlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include("errors.jl")
55
66
Fit a transformer that maps any missing value into a new level (e.g., "Missing"). By this, missingness will be treated as a new
77
level by any subsequent model. This assumes that the categorical features have raw
8-
types that are in `Union{Char, AbstractString, Number}`.
8+
types that are in `Char`, `AbstractString`, and `Number`.
99
1010
# Arguments
1111
@@ -15,7 +15,7 @@ types that are in `Union{Char, AbstractString, Number}`.
1515
- `ignore=true`: Whether to exclude or includes the features given in `features`
1616
- `ordered_factor=false`: Whether to encode `OrderedFactor` or ignore them
1717
- `label_for_missing::Dict{<:Type, <:Any}()= Dict( AbstractString => "missing", Char => 'm', )`: A
18-
dictionary where the possible values for keys are the types in `Union{Char, AbstractString, Number}` and where each value
18+
dictionary where the possible values for keys are the types in `Char`, `AbstractString`, and `Number` and where each value
1919
signifies the new level to map into given a column raw super type. By default, if the raw type of the column subtypes `AbstractString`
2020
then missing values will be replaced with `"missing"` and if the raw type subtypes `Char` then the new value is `'m'`
2121
and if the raw type subtypes `Number` then the new value is the lowest value in the column - 1.

β€Žsrc/transformers/cardinality_reducer/cardinality_reducer.jlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include("errors.jl")
77
Fit a transformer that maps any level of a categorical feature that occurs with
88
frequency < `min_frequency` into a new level (e.g., "Other"). This is useful when some categorical features have
99
high cardinality and many levels are infrequent. This assumes that the categorical features have raw
10-
types that are in `Union{Char, AbstractString, Number}`.
10+
types that are in `Char`, `AbstractString`, and `Number`.
1111
1212
# Arguments
1313
@@ -19,7 +19,7 @@ types that are in `Union{Char, AbstractString, Number}`.
1919
- `min_frequency::Real=3`: Any level of a categorical feature that occurs with frequency < `min_frequency` will be mapped to a new level. Could be
2020
an integer or a float which decides whether raw counts or normalized frequencies are used.
2121
- `label_for_infrequent::Dict{<:Type, <:Any}()= Dict( AbstractString => "Other", Char => 'O', )`: A
22-
dictionary where the possible values for keys are the types in `Union{Char, AbstractString, Number}` and each value signifies
22+
dictionary where the possible values for keys are the types in `Char`, `AbstractString`, and `Number` and each value signifies
2323
the new level to map into given a column raw super type. By default, if the raw type of the column subtypes `AbstractString`
2424
then the new value is `"Other"` and if the raw type subtypes `Char` then the new value is `'O'`
2525
and if the raw type subtypes `Number` then the new value is the lowest value in the column - 1.

β€Žsrc/transformers/cardinality_reducer/interface_mlj.jlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Train the machine using `fit!(mach, rows=...)`.
112112
- `min_frequency::Real=3`: Any level of a categorical feature that occurs with frequency < `min_frequency` will be mapped to a new level. Could be
113113
an integer or a float which decides whether raw counts or normalized frequencies are used.
114114
- `label_for_infrequent::Dict{<:Type, <:Any}()= Dict( AbstractString => "Other", Char => 'O', )`: A
115-
dictionary where the possible values for keys are the types in `Union{Char, AbstractString, Number}` and each value signifies
115+
dictionary where the possible values for keys are the types in `Char`, `AbstractString`, and `Number` and each value signifies
116116
the new level to map into given a column raw super type. By default, if the raw type of the column subtypes `AbstractString`
117117
then the new value is `"Other"` and if the raw type subtypes `Char` then the new value is `'O'`
118118
and if the raw type subtypes `Number` then the new value is the lowest value in the column - 1.

0 commit comments

Comments
Β (0)