Skip to content

Commit d190641

Browse files
committed
add docs of dmatrix_ldb_flatten()
1 parent 1a3a515 commit d190641

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/src/functions/Utils.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ cost_functional
1616
```@docs
1717
dmatrix_flatten
1818
```
19+
```@docs
20+
dmatrix_ldb_flatten
21+
```

src/utils.jl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,20 @@ end
200200
"""
201201
function dmatrix_ldb_flatten(dmatrix::Array{Float64,3}...; dm::Symbol = :KLdivergence)
202202
203-
Flatten dmatrix using the LDB method; after this function is called, it becomes
204-
the size of (~, ~, 1). Example usage: dmatrix_ldb_flatten(dmatrix1, dmatrix2, dmatrix3),
205-
each argument is the expansion coefficient matrix of a class of signals.
203+
Flatten dmatrices using the LDB method; after this function is called, it returns
204+
a matrix of size (~, ~, 1).
206205
207206
### Input Arguments
208-
* `dmatrix::Array{Float64,3}`: the matrix of LDB expansion coefficients in one class
209-
* `dm::Symbol`: discriminant measure. Options: `:KLdivergence`(default),
207+
* `dmatrix::Array{Float64,3}`: the matrix of LDB expansion coefficients in one class.
208+
* `dm::Symbol`: discriminant measure. Options: `:KLdivergence` (default),
210209
`:Jdivergence`, `:l1`, `:l2`, and `:Hellinger`.
210+
211+
### Example Usage:
212+
`dmatrix_ldb_flatten(dmatrix1, dmatrix2, dmatrix3)`,
213+
each argument is the expansion coefficient matrix of a class of signals. It uses
214+
the default discriminant measure KL divergence to flatten these matrices.
215+
In other words, it flattens these expansion coefficent matrices by computing and
216+
summing "statistical distances" among them.
211217
"""
212218
function dmatrix_ldb_flatten(dmatrix::Array{Float64,3}...; dm::Symbol = :KLdivergence)
213219
C = length(dmatrix) # number of signal classes

0 commit comments

Comments
 (0)