@@ -319,16 +319,9 @@ these probabilities are always zero (see example below).
319
319
320
320
If `probs` is a matrix, it should have a column for each class in
321
321
`support` (or one less, if `augment=true`). More generally, `probs`
322
- will be an array of size of the form `(n1, n2, ..., nk, C)` where `C`
323
- is the number of classes (or one less, if `augment=true`), the
324
- constructor returning an array of size `(n1, n2, ..., nk)`.
325
-
326
- Unless `augment=true`, sums of elements along the last axis (row-sums
327
- in the case of a matrix) must be equal to one, and otherwise such an
328
- array is created by inserting appropriate elements *ahead* of those
329
- provided. For example, in the binary case, augmentation will transform
330
- a vector into a matrix, and the given probabilities will be associated
331
- with the *second* class in `support`.
322
+ will be an array whose size is of the form `(n1, n2, ..., nk, c)`,
323
+ where `c = length(suppport)` (or one less, if `augment=true`) and the
324
+ constructor then returns an array of size `(n1, n2, ..., nk)`.
332
325
333
326
```
334
327
using CategoricalArrays
@@ -356,6 +349,8 @@ julia> pdf(d, :y)
356
349
0.0
357
350
```
358
351
352
+ ### Specifying a pool
353
+
359
354
Alternatively, `support` may be a list of raw (non-categorical)
360
355
elements if `pool` is:
361
356
@@ -390,6 +385,14 @@ julia> UnivariateFinite([:x, :y, :z], probs, pool=v)
390
385
UnivariateFinite{Multiclass{4}}(x=>0.292, y=>0.339, z=>0.369)
391
386
```
392
387
388
+ ### Probability augmentation
389
+
390
+ Unless `augment=true`, sums of elements along the last axis (row-sums
391
+ in the case of a matrix) must be equal to one, and otherwise such an
392
+ array is created by inserting appropriate elements *ahead* of those
393
+ provided. This means the provided probabilities are associated with
394
+ the the classes `c2, c3, ..., cn`.
395
+
393
396
---
394
397
395
398
UnivariateFinite(prob_given_class; pool=nothing, ordered=false)
0 commit comments