Skip to content

Commit e9d0c1b

Browse files
Update Readme.md (#82)
Update README.md with information on the result types.
1 parent 2691c59 commit e9d0c1b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Kernel density estimators for Julia.
1111
The main accessor function is `kde`:
1212

1313
```
14-
kde(data)
14+
U = kde(data)
1515
```
1616

1717
will construct a `UnivariateKDE` object from the real vector `data`. The
@@ -29,6 +29,8 @@ optional keyword arguments are
2929
* `bandwidth`: the bandwidth of the kernel. Default is to use Silverman's
3030
rule.
3131

32+
The `UnivariateKDE` object `U` contains gridded coordinates (`U.x`) and the density
33+
estimate (`U.density`). These are typically sufficient for plotting.
3234
A related function
3335

3436
``` kde_lscv(data) ```
@@ -61,19 +63,22 @@ allows specifying both the distribution and grid.
6163
The usage mirrors that of the univariate case, except that `data` is now
6264
either a tuple of vectors
6365
```
64-
kde((xdata, ydata))
66+
B = kde((xdata, ydata))
6567
```
6668
or a matrix with two columns
6769
```
68-
kde(datamatrix)
70+
B = kde(datamatrix)
6971
```
7072
Similarly, the optional arguments all now take tuple arguments:
7173
e.g. `boundary` now takes a tuple of tuples `((xlo,xhi),(ylo,yhi))`.
7274

75+
The `BivariateKDE` object `B` contains gridded coordinates (`B.x` and `B.y`) and the bivariate density
76+
estimate (`B.density`).
77+
7378
### Interpolation
7479

7580
The KDE objects are stored as gridded density values, with attached
76-
coordinates. These are typically sufficient for plotting (see below), but
81+
coordinates. These are typically sufficient for plotting (see above), but
7782
intermediate values can be interpolated using the
7883
[Interpolations.jl](https://github.com/tlycken/Interpolations.jl) package via the `pdf` method
7984
(extended from Distributions.jl).

0 commit comments

Comments
 (0)