shift_in_mean_and_variance: find best split shift in mean and variance

Description Usage Arguments Value

View source: R/utils.R

Description

Efficiently calculates the gain in a one-dimensional shift in mean and variance scenario.

Usage

1

Arguments

x

Array with entries that are assumed to have a shift in mean and variance at some split point.

alpha

array of segment boundaries

train_fold

array containing indices in training fold

Value

An array on length length(x) with gains resulting from splitting at that specific split point.

The negative gaussian loglikelihood of observations x for estimated mean and variance is -n/2 * (log(2 π \hatσ^2) + 1). The gaussian maximum likelihood estimate \hatσ^2 is (sum(x^2) - sum(x)^2/length(x))/length(x)


mlondschien/hdcd documentation built on Jan. 5, 2021, 11:26 p.m.