Skip to content

Commit 8470f33

Browse files
committed
Improve docstrings
1 parent e4bc3ca commit 8470f33

File tree

6 files changed

+32
-26
lines changed

6 files changed

+32
-26
lines changed

src/transforms.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ these functions in parallel for all columns with multiple threads.
9999
100100
## Notes
101101
102-
* All ColwiseFeatureTransform subtypes must have a `colspec` field.
102+
* `ColwiseFeatureTransform` subtypes must have a `colspec` field.
103103
"""
104104
abstract type ColwiseFeatureTransform <: FeatureTransform end
105105

src/transforms/coalesce.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66
Coalesce(; value)
77
8-
Replaces all missing values from the table with `value`.
8+
Replaces all `missing` values from the table with `value`.
99
1010
Coalesce(col₁, col₂, ..., colₙ; value)
1111
Coalesce([col₁, col₂, ..., colₙ]; value)

src/transforms/eigenanalysis.jl

+27-16
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
# ------------------------------------------------------------------
44

55
"""
6-
EigenAnalysis(proj; maxdim=nothing, pratio=1.0)
6+
EigenAnalysis(proj; [maxdim], [pratio])
77
88
The eigenanalysis of the covariance with a given projection `proj`.
9-
Optionally specify the maximum number of dimensions in the output `maxdim`
10-
and the percentage of variance to retain `pratio`. Default to all dimensions of
11-
the input.
9+
Optionally specify the maximum number of dimensions in the output
10+
`maxdim` and the percentage of variance to retain `pratio`.
1211
1312
## Projections
1413
@@ -161,12 +160,12 @@ function eigenmatrices(transform, Y)
161160
end
162161

163162
"""
164-
PCA(; maxdim=nothing, pratio=1.0)
163+
PCA([options])
165164
166-
The PCA transform is a shortcut for
167-
`ZScore() → EigenAnalysis(:V; maxdim, pratio)`.
165+
Principal component analysis.
168166
169-
See also: [`ZScore`](@ref), [`EigenAnalysis`](@ref).
167+
See [`EigenAnalysis`](@ref) for detailed
168+
description of the available options.
170169
171170
# Examples
172171
@@ -175,16 +174,20 @@ PCA(maxdim=2)
175174
PCA(pratio=0.86)
176175
PCA(maxdim=2, pratio=0.86)
177176
```
177+
178+
## Notes
179+
180+
* `PCA()` is shortcut for `ZScore() → EigenAnalysis(:V)`.
178181
"""
179182
PCA(; maxdim=nothing, pratio=1.0) = ZScore() EigenAnalysis(:V, maxdim, pratio)
180183

181184
"""
182-
DRS(; maxdim=nothing, pratio=1.0)
185+
DRS([options])
183186
184-
The DRS transform is a shortcut for
185-
`ZScore() → EigenAnalysis(:VD; maxdim, pratio)`.
187+
Dimension reduction sphering.
186188
187-
See also: [`ZScore`](@ref), [`EigenAnalysis`](@ref).
189+
See [`EigenAnalysis`](@ref) for detailed
190+
description of the available options.
188191
189192
# Examples
190193
@@ -193,16 +196,20 @@ DRS(maxdim=3)
193196
DRS(pratio=0.87)
194197
DRS(maxdim=3, pratio=0.87)
195198
```
199+
200+
## Notes
201+
202+
* `DRS()` is shortcut for `ZScore() → EigenAnalysis(:VD)`.
196203
"""
197204
DRS(; maxdim=nothing, pratio=1.0) = ZScore() EigenAnalysis(:VD, maxdim, pratio)
198205

199206
"""
200-
SDS(; maxdim=nothing, pratio=1.0)
207+
SDS([options])
201208
202-
The SDS transform is a shortcut for
203-
`ZScore() → EigenAnalysis(:VDV; maxdim, pratio)`.
209+
Standardized data sphering.
204210
205-
See also: [`ZScore`](@ref), [`EigenAnalysis`](@ref).
211+
See [`EigenAnalysis`](@ref) for detailed
212+
description of the available options.
206213
207214
# Examples
208215
@@ -212,5 +219,9 @@ SDS(maxdim=4)
212219
SDS(pratio=0.88)
213220
SDS(maxdim=4, pratio=0.88)
214221
```
222+
223+
## Notes
224+
225+
* `SDS()` is shortcut for `ZScore() → EigenAnalysis(:VDV)`.
215226
"""
216227
SDS(; maxdim=nothing, pratio=1.0) = ZScore() EigenAnalysis(:VDV, maxdim, pratio)

src/transforms/filter.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ DropMissing(r"[bce]")
102102
## Notes
103103
104104
* The transform can alter the element type of columns from `Union{Missing,T}` to `T`.
105-
* If the transformed column has only missing values, it will be converted to an empty column of type `Any`.
105+
* If the transformed column has only `missing` values, it will be converted to an empty column of type `Any`.
106106
"""
107107
struct DropMissing{S<:ColSpec} <: StatelessFeatureTransform
108108
colspec::S

src/transforms/parallel.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ Scale(low=0.3, high=0.6) ⊔ EigenAnalysis(:VDV)
1818
ZScore() ⊔ EigenAnalysis(:V)
1919
```
2020
21-
### Notes
21+
## Notes
2222
23-
- Metadata is transformed with the first revertible
24-
transform in the list of `transforms`.
23+
* Metadata is transformed with the first revertible transform in the list of `transforms`.
2524
"""
2625
struct ParallelTableTransform <: TableTransform
2726
transforms::Vector{Transform}

src/transforms/scale.jl

-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ Scale([:a, :c, :e], low=0.3, high=0.7)
3030
Scale(("a", "c", "e"), low=0.25, high=0.75)
3131
Scale(r"[ace]", low=0.3, high=0.7)
3232
```
33-
34-
## Notes
35-
36-
* The `low` and `high` values are restricted to the interval [0, 1].
3733
"""
3834
struct Scale{S<:ColSpec,T} <: ColwiseFeatureTransform
3935
colspec::S

0 commit comments

Comments
 (0)