Description Usage Arguments Value Examples
View source: R/paramFitGammaOne.R
paramFitGammaOne
fits in a first step a log-concave
density to data points X with weights w using a smoothness parameter of
gamma=1. In a second step, it calculates the upper convex hull of the set X
and log(y), where y_i is the smooth log-concave density evaluated at X_i.
It returns the hyperplane parameters of the faces of this upper convex
hull.
1 | paramFitGammaOne(X, w, ACVH, bCVH, cvh)
|
X |
Set of data points (one sample per row) |
w |
Vector with weights for X ( |
ACVH |
Matrix where each row constitutes the normal vector of a face of conv(X) |
bCVH |
Vector where each entry constitutes the intercept for a face of conv(X) |
cvh |
Matrix where each row is a set of indices of points in X describing one face of conv(X) |
A list containing the description of the upper convex hull of (X,log(y)) in term of hyperplane parameters:
a |
A matrix where each row constitutes a hyperplane normal |
b |
A vector where each entry constitutes the intercept of a hyperplane |
Note the difference
1 2 3 4 5 6 | # draw samples from normal distribution
X <- matrix(rnorm(200),100,2)
# calculate parameters of convex hull of X
r <- calcCvxHullFaces(X)
# find initial hyperplane parameters based on a smooth log-concave density
params <- paramFitGammaOne(X, rep(1 / nrow(X), nrow(X)), r$ACVH, r$bCVH, r$cvh)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.