Skip to content

Commit 924df68

Browse files
committed
⭐️ Better documentation
1 parent 1e8a421 commit 924df68

File tree

8 files changed

+73
-42
lines changed

8 files changed

+73
-42
lines changed

.github/workflows/documenter.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- instate-docs
8+
tags: '*'
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
permissions:
14+
contents: write
15+
pull-requests: read
16+
statuses: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: julia-actions/setup-julia@v2
21+
with:
22+
version: '1.10'
23+
- uses: julia-actions/cache@v1
24+
- name: Install dependencies
25+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
26+
- name: Build and deploy
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
29+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
30+
run: julia --project=docs/ docs/make.jl

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ makedocs(
2525
pages = [
2626
"Introduction" => "index.md",
2727
"Transformers" => Any[
28+
"Numerical Transformers"=>"transformers/numerical.md",
2829
"Classical Encoders"=>"transformers/classical.md",
2930
"Neural-based Encoders"=>"transformers/neural.md",
3031
"Contrast Encoders"=>"transformers/contrast.md",

docs/src/index.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,15 @@ Xnew = transform(mach, X)
3535
```
3636

3737
## Available Transformers
38-
In `MLJTransforms` we define "encoders" to encompass models that specifically operate by encoding categorical variables; meanwhile, "transformers" refers to models that apply more generic transformations on columns that are not necessarily categorical. We define the following taxonomy for different models founds in `MLJTransforms`:
39-
40-
| Genre | Definition |
41-
|:----------:|:----------:|
42-
| **Classical Encoders** | Well known and commonly used categorical encoders |
43-
| **Neural-based Encoders** | Categorical encoders based on neural networks |
44-
| **Contrast Encoders** | Categorical encoders that could be modeled by a contrast matrix |
45-
| **Utility Encoders** | Categorical encoders meant to be used as preprocessors for other encoders or models |
46-
| **Other Transformers** | More generic transformers that go beyond categorical encoding |
47-
48-
49-
50-
38+
In `MLJTransforms` we denote transformers that operate on columns with `Continuous` and/or `Count` [scientific types](https://juliaai.github.io/ScientificTypes.jl/dev/) as numerical transformers. Meanwhile, categorical transformers operate on `Multiclass` and/or `OrderedFactor` [scientific types](https://juliaai.github.io/ScientificTypes.jl/dev/). Most categorical transformers in this package operate by converting categorical values into numerical values or vectors, and are therefore considered categorical encoders.
39+
40+
Based on this, we categorize the methods as follows, with further distinctions for categorical encoders:
41+
42+
| **Category** | **Description** |
43+
|:---------------------------:|:-------------------------------------------------------------------------------:|
44+
| **Numerical Transformers** | Transformers that operate on `Continuous` or `Count` columns in a given dataset.|
45+
| **Classical Encoders** | Widely recognized and frequently utilized categorical encoders. |
46+
| **Neural-based Encoders** | Categorical encoders based on neural networks. |
47+
| **Contrast Encoders** | Categorical encoders modeled via a contrast matrix. |
48+
| **Utility Encoders** | Categorical encoders meant to be used as preprocessors for other encoders or models.|
49+
| **Other Transformers** | Transformers that fall into other categories. |

docs/src/transformers/contrast.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ Contrast Encoders include categorical encoders that could be modeled by a contra
55
| [DummyEncoder](@ref) | Encodes by comparing each level to the reference level, intercept being the cell mean of the reference group |
66
| [SumEncoder](@ref) | Encodes by comparing each level to the reference level, intercept being the grand mean |
77
| [HelmertEncoder](@ref) | Encodes by comparing levels of a variable with the mean of the subsequent levels of the variable
8-
|
9-
| [HelmertEncoder](@ref) | Encodes by comparing levels of a variable with the mean of the subsequent levels of the variable |
108
| [ForwardDifferenceEncoder](@ref) | Encodes by comparing adjacent levels of a variable (each level minus the next level)
11-
|
129
| [ContrastEncoder](@ref) | Allows defining a custom contrast encoder via a contrast matrix |
1310
| [HypothesisEncoder](@ref) | Allows defining a custom contrast encoder via a hypothesis matrix |
1411

docs/src/transformers/neural.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Neural-based Encoders include ategorical encoders based on neural networks:
1+
Neural-based Encoders include categorical encoders based on neural networks:
22

33
| Transformer | Brief Description |
44
|:----------:|:----------:|

docs/src/transformers/numerical.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Other Transformers include more generic transformers that go beyond categorical encoding
2+
3+
| Transformer | Brief Description |
4+
|:----------:|:----------:|
5+
| [Standardizer](@ref) | Transforming columns of numerical features by standardization |
6+
| [BoxCoxTransformer](@ref) | Transforming columns of numerical features by BoxCox transformation |
7+
| [UnivariateBoxCoxTransformer](@ref) | Apply BoxCox transformation given a single vector |
8+
| [InteractionTransformer](@ref) | Transforming columns of numerical features to create new interaction features |
9+
| [UnivariateDiscretizer](@ref) | Discretize a continuous vector into an ordered factor |
10+
11+
```@docs
12+
MLJTransforms.Standardizer
13+
```
14+
15+
```@docs
16+
MLJTransforms.InteractionTransformer
17+
```
18+
19+
```@docs
20+
MLJTransforms.BoxCoxTransformer
21+
```
22+
23+
```@docs
24+
MLJTransforms.UnivariateDiscretizer
25+
```

docs/src/transformers/others.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
1-
Other Transformers include more generic transformers that go beyond categorical encoding
1+
Transformers that operate on columns with general or specialized scientific types.
22

33
| Transformer | Brief Description |
44
|:----------:|:----------:|
5-
| [FillImputer](@ref) | Fill missing values of any features belonging to any scientific type |
6-
| [Standardizer](@ref) | Transforming columns of numerical features by standardization |
7-
| [BoxCoxTransformer](@ref) | Transforming columns of numerical features by BoxCox transformation |
8-
| [InteractionTransformer](@ref) | Transforming columns of numerical features by creating new interaction features |
9-
| [UnivariateBoxCoxTransformer](@ref) | Apply BoxCox transformation given a single vector |
10-
| [UnivariateDiscretizer](@ref) | Discretize a continuous vector into an ordered factor |
5+
| [FillImputer](@ref) | Fill missing values of features belonging to any scientific type |
116
| [UnivariateTimeTypeToContinuous](@ref) | Transform a vector of time type into continuous type |
127

138
```@docs
149
MLJTransforms.FillImputer
1510
```
1611

17-
```@docs
18-
MLJTransforms.Standardizer
19-
```
20-
21-
```@docs
22-
MLJTransforms.BoxCoxTransformer
23-
```
24-
25-
```@docs
26-
MLJTransforms.InteractionTransformer
27-
```
28-
29-
30-
```@docs
31-
MLJTransforms.UnivariateDiscretizer
32-
```
3312

3413
```@docs
3514
MLJTransforms.UnivariateTimeTypeToContinuous

docs/src/transformers/utility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Utility Encoders include categorical encoders meant to be used as preprocessors
22

33
| Transformer | Brief Description |
44
|:----------:|:----------:|
5-
| [CardinalityReducer](@ref) | Reduce cardinality of high cardinality features by grouping infrequent categories |
6-
| [MissingnessEncoder](@ref) | Encode missing values of categorical columns into new values |
5+
| [CardinalityReducer](@ref) | Reduce cardinality of high cardinality categorical features by grouping infrequent categories |
6+
| [MissingnessEncoder](@ref) | Encode missing values of categorical features into new values |
77

88
```@docs
99
MLJTransforms.CardinalityReducer

0 commit comments

Comments
 (0)