@@ -318,7 +318,7 @@ const UNIVARIATE_FINITE_DOCSTRING =
318318
319319Construct a discrete univariate distribution whose finite support is
320320the elements of the vector `support`, and whose corresponding
321- probabilities are elements of the vector `probs`. More generally ,
321+ probabilities are elements of the vector `probs`. Alternatively ,
322322construct an abstract *array* of `UnivariateFinite` distributions by
323323choosing `probs` to be an array of one higher dimension than the array
324324generated.
@@ -328,13 +328,13 @@ Unless `pool` is specified, `support` should have type
328328 share the same categorical pool, which may be larger than `support`.
329329
330330*Important.* All levels of the common pool have associated
331- probabilites , not just those in the specified `support`. However,
331+ probabilities , not just those in the specified `support`. However,
332332these probabilities are always zero (see example below).
333333
334334If `probs` is a matrix, it should have a column for each class in
335335`support` (or one less, if `augment=true`). More generally, `probs`
336336will be an array whose size is of the form `(n1, n2, ..., nk, c)`,
337- where `c = length(suppport )` (or one less, if `augment=true`) and the
337+ where `c = length(support )` (or one less, if `augment=true`) and the
338338constructor then returns an array of size `(n1, n2, ..., nk)`.
339339
340340```
@@ -345,7 +345,7 @@ julia> UnivariateFinite(classes(v), [0.2, 0.3, 0.5])
345345UnivariateFinite{Multiclass{3}}(x=>0.2, y=>0.3, z=>0.5)
346346
347347julia> d = UnivariateFinite([v[1], v[end]], [0.1, 0.9])
348- UnivariateFiniteMulticlass {3}(x=>0.1, z=>0.9)
348+ UnivariateFinite{Multiclass {3}(x=>0.1, z=>0.9)
349349
350350julia> rand(d, 3)
3513513-element Array{Any,1}:
@@ -416,10 +416,13 @@ the set of keys of the provided dictionary, `prob_given_class`, and
416416whose values specify the corresponding probabilities.
417417
418418The type requirements on the keys of the dictionary are the same as
419- the elements of `support` given above. If the values (probabilities)
420- are arrays instead of scalars, then an abstract array of
421- `UnivariateFinite` elements is created, with the same size as the
422- array.
419+ the elements of `support` given above with this exception: if
420+ non-categorical elements (raw labels) are used as keys, then
421+ `pool=...` must be specified and cannot be `missing`.
422+
423+ If the values (probabilities) are arrays instead of scalars, then an
424+ abstract array of `UnivariateFinite` elements is created, with the
425+ same size as the array.
423426
424427"""
425428UNIVARIATE_FINITE_DOCSTRING
0 commit comments