Learn R Programming

pcds (version 0.1.2)

ArcsCS1D: The arcs of Central Similarity Proximity Catch Digraph (CS-PCD) for 1D data - multiple interval case

Description

An object of class "PCDs". Returns arcs as tails (or sources) and heads (or arrow ends) for 1D data set Xp as the vertices of CS-PCD. Yp determines the end points of the intervals.

For this function, CS proximity regions are constructed data points inside or outside the intervals based on Yp points with expansion parameter \(t>0\) and centrality parameter \(c \in (0,1)\). That is, for this function, arcs may exist for points in the middle or end intervals. It also provides various descriptions and quantities about the arcs of the CS-PCD such as number of arcs, arc density, etc.

Equivalent to function ArcsCSMI.

See also (ceyhan:revstat-2016;textualpcds).

Usage

ArcsCS1D(Xp, Yp, t, c)

Arguments

Xp

A set or vector of 1D points which constitute the vertices of the CS-PCD.

Yp

A set or vector of 1D points which constitute the end points of the intervals.

t

A positive real number which serves as the expansion parameter in CS proximity region.

c

A positive real number in \((0,1)\) parameterizing the center inside int\(=(a,b)\). For the interval, int\(=(a,b)\), the parameterized center is \(M_c=a+c(b-a)\).

Value

A list with the elements

type

A description of the type of the digraph

parameters

Parameters of the digraph, here, they are expansion and centrality parameters.

tess.points

Points on which the tessellation of the study region is performed, here, tessellation is the intervalization of the real line based on Yp points.

tess.name

Name of data set used in tessellation, it is Yp for this function

vertices

Vertices of the digraph, Xp points

vert.name

Name of the data set which constitute the vertices of the digraph

S

Tails (or sources) of the arcs of CS-PCD for 1D data

E

Heads (or arrow ends) of the arcs of CS-PCD for 1D data

mtitle

Text for "main" title in the plot of the digraph

quant

Various quantities for the digraph: number of vertices, number of partition points, number of intervals, number of arcs, and arc density.

References

See Also

ArcsCSmid1D, ArcsCSend1D, ArcsCSMI, ArcsPEmid1D, ArcsPEend1D and ArcsPE1D

Examples

Run this code
# NOT RUN {
t<-1.5
c<-.4
a<-0; b<-10; int<-c(a,b)

#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
xr<-range(a,b)
xf<-(xr[2]-xr[1])*.1

Xp<-runif(nx,a-xf,b+xf)
Yp<-runif(ny,a,b)

ArcsCS1D(Xp,Yp,t,c)

Arcs<-ArcsCS1D(Xp,Yp,t,c)
Arcs
summary(Arcs)
plot(Arcs)

S<-Arcs$S
E<-Arcs$E

jit<-.1
yjit<-runif(nx,-jit,jit)

Xlim<-range(a,b,Xp,Yp)
xd<-Xlim[2]-Xlim[1]

plot(cbind(a,0),pch=".",
main="arcs of CS-PCD for points in mid and end intervals ", xlab=" ", ylab=" ",
     xlim=Xlim+xd*c(-.05,.05),ylim=3*c(-jit,jit))
abline(h=0,lty=1)
points(Xp, yjit,pch=".",cex=3)
abline(v=Yp,lty=2)
arrows(S, yjit, E, yjit, length = .05, col= 4)

# }

Run the code above in your browser using DataLab