Description Usage Arguments Examples
Create a plot for the target distribution (in black) and barycenter (in red).
1 2 3 4 5 6 7 |
evgrid |
a vector of gridpoints used to evaluate quantile functions. |
bc |
a vector of evaluated barycenter; can be calculated by |
target |
a vector of observations. |
y_name |
a string for the title of the y-axis. |
x_name |
a string for the title of the x-axis. |
1 2 3 4 5 6 7 8 | #simulated data from Gaussian mixture
#ex_gmm() calls the simulated data
#detail can be found by ??ex_gmm
#obtaining the optimal weights
DSC_res=DSC_weights(ex_gmm()$control,ex_gmm()$target, M=100)
weights=DSC_res[[1]]
DSC_res2=DSC_bc(ex_gmm()$control,weights,seq(from=0,to=1,length.out=1001))
DSC_plot(bc=DSC_res2[[2]],target=ex_gmm()$target)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.