evaluate_scorematching_loss: Evaluation of the Score Matching Loss Function

View source: R/evaluate_scorematching_loss.R

evaluate_scorematching_lossR Documentation

Evaluation of the Score Matching Loss Function

Description

Evaluates the score matching loss function at new_data.

Usage

evaluate_scorematching_loss(scorematching_logconcave, new_data)

Arguments

scorematching_logconcave

An object of class "LogConcaveDESM", usually the output of lcd_scorematching or cv_optimal_density_estimate.

new_data

A numeric vector of real numbers at which the score matching loss function should be evaluated.

Value

A numeric of the score matching loss function evaluated at the new_data.

Examples

set.seed(1119)
N <- 100
data <- rnorm(N)
domain <- c(-5, 5)
result <- lcd_scorematching(data, domain, penalty_param = 1e-10)

evaluate_scorematching_loss(scorematching_logconcave = result, new_data = result$data)

evaluate_scorematching_loss(scorematching_logconcave = result,
new_data = seq(-5, 5, by = 0.01))


zhoucx1119/LogConcaveDESM documentation built on Aug. 28, 2024, 3:25 p.m.