chooseSharpen: Choose sharpen parameter of a conditional density estimator

Description Usage Arguments Value

View source: R/basicFunctions.R

Description

Chooses optimal alpha for the new conditional density estimator f(z|x) <- f^alpha(z|x).

Usage

1
2
3
4
5
6
7
chooseSharpen(
  objectCDE,
  X,
  Z,
  alpha_grid = seq(0.01, 10, length.out = 20),
  n_grid = n_grid
)

Arguments

objectCDE

An object of the class FlexCoDE with a fitted CDE, typically fitted used fitFlexCoDE beforehand

X

Covariates used to validate (tune) the model (one x observation per row).

Z

Responses used to validate (tune) the model (matrix with 1 column). Each row corresponds to a row of the xValidation argument

alpha_grid

Grid of values of alpha

Value

Value of alpha which minimizes CDE loss


rizbicki/FlexCoDE documentation built on Feb. 10, 2022, 3:14 p.m.