Skip to content

Commit d895ac4

Browse files
committed
➕ Declare more private methods
1 parent 6c3ee67 commit d895ac4

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/encoders/frequency_encoding/frequency_encoding.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
"""
3+
**Private method.**
4+
35
Fit an encoder that encodes the categorical values in the specified
46
categorical columns with their (normalized or raw) frequencies of occurrence in the dataset.
57
@@ -43,6 +45,8 @@ function frequency_encoder_fit(
4345
end
4446

4547
"""
48+
**Private method.**
49+
4650
Encode the levels of a categorical variable in a given table with their (normalized or raw) frequencies of occurrence in the dataset.
4751
4852
# Arguments

src/encoders/ordinal_encoding/ordinal_encoding.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
"""
3+
**Private method.**
4+
35
Fit an encoder to encode the levels of categorical variables in a given table as integers (ordered arbitrarily).
46
57
# Arguments
@@ -42,6 +44,8 @@ end
4244

4345

4446
"""
47+
**Private method.**
48+
4549
Encode the levels of a categorical variable in a given table as integers.
4650
4751
# Arguments

src/encoders/target_encoding/target_encoding.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ end
106106

107107

108108
"""
109+
**Private method.**
110+
109111
target_encoder_fit(X, y, features=[]; ignore=true, ordered_factor=false, λ = 1.0, m=0)
110112
111113
Fit a target encoder on table X with target y by computing the necessary statistics for every categorical column.
@@ -220,6 +222,8 @@ end
220222

221223

222224
"""
225+
**Private method.**
226+
223227
target_encoder_transform(X, cache)
224228
225229
Transform given data with fitted target encoder cache.

src/transformers/cardinality_reducer/cardinality_reducer.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
include("errors.jl")
33

44
"""
5+
**Private method.**
6+
57
Fit a transformer that maps any level of a categorical column that occurs with
68
frequency < `min_frequency` into a new level (e.g., "Other"). This is useful when some categorical columns have
79
high cardinality and many levels are infrequent. This assumes that the categorical columns have raw
@@ -105,6 +107,8 @@ end
105107

106108

107109
"""
110+
**Private method.**
111+
108112
Apply a fitted cardinality reducer to a table given the output of `cardinality_reducer_fit`
109113
110114
# Arguments

0 commit comments

Comments
 (0)