data1: simulated data containing one symmetric bump

Description Usage Format Details Examples

Description

N = 500; set.seed(50); #spherical Bump1 <- cbind(x=rnorm(N,0,.45), y=rnorm(N,0,.45),l=1);#center at (0,0)

Bckgr <- cbind(x=runif(2*N,-4,4), y=runif(2*N,-4,4),l=0);#center at (0,0); data1 <- as.data.frame(rbind(Bump1, Bckgr)); data1$l = factor(data1$l)

Usage

1

Format

A data frame with 1500 observations on the following 3 variables.

x

spatial x coordinate

y

spatial y coordinate

l

binary flag

Details

N = 500; set.seed(50); #spherical Bump1 <- cbind(x=rnorm(N,0,.45), y=rnorm(N,0,.45),l=1);#center at (0,0)

Bckgr <- cbind(x=runif(2*N,-4,4), y=runif(2*N,-4,4),l=0);#center at (0,0); data1 <- as.data.frame(rbind(Bump1, Bckgr)); data1$l = factor(data1$l)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(data1)
library(rpart)
library(partykit)
 rp = rpart(l ~ x + y, data = data1)
 #plot(rp)
 party_rp <- as.party(rp)
 plot(party_rp)
 
 plot(y ~ x, col = as.numeric(l), data = data1, cex = 0.5, pch=20,main="rpart")
 PartitionParty(party_rp,vars=c("x","y"), verbose=0)

TreeHotspots documentation built on May 2, 2019, 5:17 p.m.