Learn R Programming

delt (version 0.8.2)

partition: Finds the partition generated by an evaluation tree

Description

Finds the partition generated by an evaluation tree. An evaluation tree makes a recursive partition of a rectangle. Functions "eval.cart", "densplit",... return evaluation trees.

Usage

partition(et, grid=TRUE, zerorecs=FALSE)

Arguments

et
an evaluation tree; output of "eval.cart", "densplit", ...
grid
TRUE or FALSE; whether the true coordinates or relative coordinates are used
zerorecs
TRUE or FALSE; whether the rectangles where the density vanishes are included; (evaluation trees are used by package "delt" to represent density functions)

Value

Returns a list with the following elements.
values
vector whose lenght is equal to the number of rectangles in the partition; value of the function on the corresponding rectangle
recs
recnum*(2*d) matrix; recnum is the number of rectangles in the partition and d is the dimension of the observations. The rows of "recs" describe the rectangles. Column (2*j-1) gives the lower value for the j:th interval and (2*j):th column gives upper value for the j:th interval, j=1,...,d.
support
the rectangle which is partitioned

See Also

plotparti,

Examples

Run this code
library(denpro)
dendat<-sim.data(n=100,seed=5,type="mulmodII")
et<-densplit(dendat)

pa<-partition(et)

plotparti(pa)

Run the code above in your browser using DataLab