Learn R Programming

pcds (version 0.1.6)

NumArcsCS1D: Number of arcs of Central Similarity Proximity Catch Digraphs (CS-PCDs) for 1D data - multiple interval case

Description

Returns the number of arcs of Central Similarity Proximity Catch Digraph (CS-PCD) whose vertices are the data points in Xp in the multiple interval case.

For this function, CS proximity regions are constructed data points inside or outside the intervals based on Yp points with expansion parameter \(t \ge 0\) and centrality parameter \(c \in (0,1)\). That is, for this function, arcs may exist for points in the middle or end intervals.

Range (or convex hull) of Yp (i.e., the interval \((\min(Yp),\max(Yp))\)) is partitioned by the spacings based on Yp points (i.e., multiple intervals are these partition intervals based on the order statistics of Yp points whose union constitutes the range of Yp points). For the number of arcs, loops are not counted.

Usage

NumArcsCS1D(Xp, Yp, t, c = 0.5)

Value

A list with the elements

num.arcs

Total number of arcs in all intervals (including the end intervals), i.e., the number of arcs for the entire CS-PCD

num.in.range

Number of Xp points in the range or convex hull of Yp points

num.in.ints

The vector of number of Xp points in the partition intervals (including the end intervals) based on Yp points

weight.vec

The vector of the lengths of the middle partition intervals (i.e., end intervals excluded) based on Yp points

int.num.arcs

The vector of the number of arcs of the components of the CS-PCD in the partition intervals (including the end intervals) based on Yp points

part.int

A matrix with columns corresponding to the partition intervals based on Yp points.

data.int.ind

A vector of indices of partition intervals in which data points reside, i.e., column number of part.int is provided for each Xp point. Partition intervals are numbered from left to right with 1 being the left end interval.

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 partition intervals.

t

A positive real number which serves as the expansion parameter in CS proximity region; must be \(> 0\).

c

A positive real number in \((0,1)\) parameterizing the center inside the middle (partition) intervals with the default c=.5. For an interval, \((a,b)\), the parameterized center is \(M_c=a+c(b-a)\).

Author

Elvan Ceyhan

References

See Also

NumArcsCSint, NumArcsCSmid.int, NumArcsCSend.int, and NumArcsPE1D

Examples

Run this code
if (FALSE) {
tau<-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<-5;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
xf<-(int[2]-int[1])*.1

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

NumArcsCS1D(Xp,Yp,tau,c)
NumArcsCS1D(Xp,Yp,tau,c=.3)
NumArcsCS1D(Xp,Yp,t=2,c)
}

Run the code above in your browser using DataLab