best.unbal.haar: Best top-down Unbalanced Haar decomposition

View source: R/best.unbal.haar.R

best.unbal.haarR Documentation

Best top-down Unbalanced Haar decomposition

Description

The function finds the “best” top-down Unbalanced Haar (UH) decomposition of the input vector x, according to a selection rule (criterion) which specifies which UH vector gets chosen at each scale and location.

Usage

best.unbal.haar(x, criterion = inner.prod.max)

Arguments

x

a vector

criterion

a function which takes a vector of length n and returns an integer between 1 and n-1

Value

tree

A list of J matrices, where J represents the number of “scales”. Each matrix is of size 5 x (the number of UH coefficients at a given scale). Each column (= vector of length 5) contains an Unbalanced Haar coefficient in the following format: 1st component - an index of the coefficient; 2nd component - the value of the coefficient; 3rd component - time point where the corresponding UH vector starts; 4th component - last time point before the breakpoint of the UH vector; 5th component - end point of the UH vector.

smooth

the “smooth” component of x, equal to sum(x) / sqrt(n), where n is the length of x

Author(s)

Piotr Fryzlewicz

See Also

inner.prod.max, inner.prod.max.p, best.unbal.haar.bu

Examples

best.unbal.haar(rnorm(100), inner.prod.max.p)

unbalhaar documentation built on April 19, 2022, 5:05 p.m.