Type: | Package |
Title: | Statistical Estimation of Cluster Parameters |
Version: | 0.1.5 |
Author: | Pavel V. Moskalev |
Maintainer: | Pavel V. Moskalev <moskalefff@gmail.com> |
Description: | Estimating parameters of site clusters on 2D & 3D square lattice with various lattice sizes, relative fractions of open sites (occupation probability), iso- & anisotropy, von Neumann & Moore (1,d)-neighborhoods, described by Moskalev P.V. et al. (2011) <doi:10.48550/arXiv.1105.2334>. |
License: | GPL-3 |
Encoding: | UTF-8 |
Depends: | SPSL |
NeedsCompilation: | no |
Packaged: | 2022-05-11 08:12:00 UTC; moska |
Repository: | CRAN |
Date/Publication: | 2022-05-11 08:30:02 UTC |
Statistical Estimation of Cluster Parameters (SECP)
Description
Estimating parameters of site clusters on 2D & 3D square lattice with various lattice sizes, relative fractions of open sites (occupation probability), iso- & anisotropy, von Neumann & Moore (1,d)-neighborhoods, and weighted distribution, described by Moskalev P.V. (2011) <arXiv:1105.2334v1>.
Details
Package: | SECP |
Type: | Package |
Version: | 0.1.5 |
Date: | 2022-05-10 |
License: | GPL-3 |
asc2s()
and asc3s()
functions calculates the boundary coordinates for the anisotropic set cover on a 2D & 3D square lattice with a fixed edge & face along the lattice boundary.
isc2s()
and isc3s()
functions calculates the boundary coordinates for the isotropic set cover on the 2D & 3D square lattice with a fixed point in the lattice center.
fdc2s()
and fdc3s()
functions use a linear regression model for statistical estimation of the mass fractal dimension of a site cluster on 2D & 3D square lattice.
fds2s()
and fds3s()
functions use a linear regression model for statistical estimation of the mass fractal dimension of sampling clusters on 2D & 3D square lattice.
Author(s)
Pavel V. Moskalev <moskalefff@gmail.com>
References
Moskalev P.V., Grebennikov K.V. and Shitov V.V. (2011) Statistical estimation of percolation cluster parameters. Proceedings of Voronezh State University. Series: Systems Analysis and Information Technologies, No.1 (January-June), pp.29-35, arXiv:1105.2334v1; in Russian.
Anisotropic set cover on the 2D square lattice
Description
asc2s()
function calculates the boundary coordinates for the anisotropic set cover on the 2D square lattice with a fixed edge along the lattice boundary.
Usage
asc2s(k=12, x=rep(95, times=2), dir=2, r=(x[dir]-3)^(seq(k)/k))
Arguments
k |
a maximal set cover size: |
x |
a vector of lattice sizes: |
dir |
a variable component index: x) |
r |
a variable lenght of set cover elements: |
Details
The percolation is simulated on 2D square lattice with uniformly weighted sites and the constant parameter p
.
The percolation cluster is formed from the accessible sites connected with initial sites subset.
If an initial cluster subset in the lattice center, to estimate the mass fractal dimension requires an anisotropic set cover with a fixed edge along the lattice boundary.
The anisotropic set cover on 2D square lattice is formed from scalable rectangles with a variable length r+1
and a fixed edge along the lattice boundary.
Value
A list of boundary coordinates and sizes for the anisotropic set cover on a 2D square lattice with a fixed edge along the lattice boundary.
Author(s)
Pavel V. Moskalev
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example: Anisotropic set cover, dir=2
# # # # # # # # # # # # # # # # #
pc <- .592746
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2; ssy <- seq(lx+2, 2*lx-1)
set.seed(20120627); ac2 <- ssi20(x=lx, p=p2, set=ssy, all=FALSE)
bnd <- asc2s(k=9, x=dim(ac2), dir=2)
x <- y <- seq(lx)
image(x, y, ac2, cex.main=1,
main=paste("Anisotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(v=ss, lty=2)
Anisotropic set cover on the 3D square lattice
Description
asc3s()
function calculates the boundary coordinates for the anisotropic set cover on the 3D square lattice with a fixed face along the lattice boundary.
Usage
asc3s(k=12, x=rep(95, times=3), dir=3, r=(x[dir]-3)^(seq(k)/k))
Arguments
k |
a maximal set cover size: |
x |
a vector of lattice sizes: |
dir |
a variable component index: x) |
r |
a variable lenght of set cover elements: |
Details
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameter p
.
The percolation cluster is formed from the accessible sites connected with initial sites subset.
If an initial cluster subset in the lattice center, to estimate the mass fractal dimension requires an anisotropic set cover with a fixed face along the lattice boundary.
The anisotropic set cover on 3D square lattice is formed from scalable cuboids with a variable length r+1
and a fixed face along the lattice boundary.
Value
A list of boundary coordinates and sizes for the anisotropic set cover on a 3D square lattice with a fixed face along the lattice boundary.
Author(s)
Pavel V. Moskalev
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example: Anisotropic set cover, dir=3
# # # # # # # # # # # # # # # # #
pc <- .311608
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2; ssz <- seq(lx^2+lx+2, 2*lx^2-lx-1)
set.seed(20120627); ac2 <- ssi30(x=lx, p=p2, set=ssz, all=FALSE)
bnd <- asc3s(k=9, x=dim(ac2), dir=3)
x <- z <- seq(lx); y2 <- ac2[,ss,]
image(x, z, y2, cex.main=1,
main=paste("Anisotropic set cover and\n",
"a 3D cluster of sites in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(v=ss, lty=2)
Mass fractal dimension of a 2D cluster
Description
fdc2s()
function uses a linear regression model for statistical estimation of the mass fractal dimension of a cluster on 2D square lattice with iso- & anisotropic sets cover.
Usage
fdc2s(acc=ssi20(x=95), bnd=isc2s(k=12, x=dim(acc)))
Arguments
acc |
an accessibility matrix for 2D square percolation lattice. |
bnd |
bounds for the iso- or anisotropic set cover. |
Details
The mass fractal dimension for a cluster is equal to the coefficient of linear regression between log(n)
and log(r)
, where n
is an absolute frequency of the total cluster sites which are bounded elements of iso- & anisotropic sets cover.
The isotropic set cover on 2D square lattice is formed from scalable squares with variable sizes 2r+1
and a fixed point in the lattice center.
The anisotropic set cover on 2D square lattice is formed from scalable rectangles with variable sizes r+1
and a fixed edge along the lattice boundary.
The percolation is simulated on 2D square lattice with uniformly weighted sites and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset.
If acc[e]<p
then e
is accessible site; if acc[e]==1
then e
is non-accessible site; if acc[e]==2
then e
belong to a sites cluster.
Value
A linear regression model for statistical estimation of the mass fractal dimension of a cluster on 2D square lattice with iso- & anisotropic sets cover.
Author(s)
Pavel V. Moskalev
References
Moskalev P.V., Grebennikov K.V. and Shitov V.V. (2011) Statistical estimation of percolation cluster parameters. Proceedings of Voronezh State University. Series: Systems Analysis and Information Technologies, No.1 (January-June), pp.29-35, arXiv:1105.2334v1; in Russian.
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example 1: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .592746
p1 <- pc - .03
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2
set.seed(20120627); ac1 <- ssi20(x=lx, p=p1)
set.seed(20120627); ac2 <- ssi20(x=lx, p=p2)
bnd <- isc2s(k=9, x=dim(ac1))
fd1 <- fdc2s(acc=ac1, bnd=bnd)
fd2 <- fdc2s(acc=ac2, bnd=bnd)
n1 <- fd1$model[,"n"]; n2 <- fd2$model[,"n"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
nn1 <- predict(fd1, newdata=list(r=rr), interval="conf")
nn2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- y <- seq(lx)
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, y, ac1, cex.main=1,
main=paste("Isotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
image(x, y, ac2, cex.main=1,
main=paste("Isotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
plot(r1, n1, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, nn1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, n2, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, nn2, lty=c(1,2,2), col=c("black","red","red"))
## Not run:
# # # # # # # # # # # # # # # # #
# Example 2: Anisotropic set cover, dir=2
# # # # # # # # # # # # # # # # #
pc <- .592746
p1 <- pc - .03
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2; ssy <- seq(lx+2, 2*lx-1)
set.seed(20120627); ac1 <- ssi20(x=lx, p=p1, set=ssy, all=FALSE)
set.seed(20120627); ac2 <- ssi20(x=lx, p=p2, set=ssy, all=FALSE)
bnd <- asc2s(k=9, x=dim(ac1), dir=2)
fd1 <- fdc2s(acc=ac1, bnd=bnd)
fd2 <- fdc2s(acc=ac2, bnd=bnd)
n1 <- fd1$model[,"n"]; n2 <- fd2$model[,"n"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
nn1 <- predict(fd1, newdata=list(r=rr), interval="conf")
nn2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- y <- seq(lx)
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, y, ac1, cex.main=1,
main=paste("Anisotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(v=ss, lty=2)
image(x, y, ac2, cex.main=1,
main=paste("Anisotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(v=ss, lty=2)
plot(r1, n1, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, nn1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, n2, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, nn2, lty=c(1,2,2), col=c("black","red","red"))
## End(Not run)
Mass fractal dimension of a 3D cluster
Description
fdc3s()
function uses a linear regression model for statistical estimation of the mass fractal dimension of a cluster on 3D square lattice with iso- & isotropic sets cover.
Usage
fdc3s(acc=ssi30(x=95), bnd=isc3s(k=12, x=dim(acc)))
Arguments
acc |
an accessibility matrix for 3D square percolation lattice. |
bnd |
bounds for the iso- or anisotropic set cover. |
Details
The mass fractal dimension for a cluster is equal to the coefficient of linear regression between log(n)
and log(r)
, where n
is an absolute frequency of the total cluster sites which are bounded elements of iso- & anisotropic sets cover.
The isotropic set cover on 3D square lattice is formed from scalable cubes with variable sizes 2r+1
and a fixed point in the lattice center.
The anisotropic set cover on 3D square lattice is formed from scalable cuboids with variable sizes r+1
and a fixed face along the lattice boundary.
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset.
If acc[e]<p
then e
is accessible site; if acc[e]==1
then e
is non-accessible site; if acc[e]==2
then e
belong to a sites cluster.
Value
A linear regression model for statistical estimation of the mass fractal dimension of a cluster on 3D square lattice with iso- & anisotropic sets cover.
Author(s)
Pavel V. Moskalev
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example 1: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .311608
p1 <- pc - .02
p2 <- pc + .02
lx <- 33; ss <- (lx+1)/2
set.seed(20120627); ac1 <- ssi30(x=lx, p=p1)
set.seed(20120627); ac2 <- ssi30(x=lx, p=p2)
bnd <- isc3s(k=9, x=dim(ac1))
fd1 <- fdc3s(acc=ac1, bnd=bnd)
fd2 <- fdc3s(acc=ac2, bnd=bnd)
n1 <- fd1$model[,"n"]; n2 <- fd2$model[,"n"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
nn1 <- predict(fd1, newdata=list(r=rr), interval="conf")
nn2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- z <- seq(lx)
y1 <- ac1[,ss,]; y2 <- ac2[,ss,]
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, z, y1, cex.main=1,
main=paste("Isotropic set cover and\n",
"a 3D cluster in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
image(x, z, y2, cex.main=1,
main=paste("Isotropic set cover and\n",
"a 3D cluster in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
plot(r1, n1, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, nn1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, n2, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, nn2, lty=c(1,2,2), col=c("black","red","red"))
## Not run:
# # # # # # # # # # # # # # # # #
# Example 1: Anisotropic set cover, dir=3
# # # # # # # # # # # # # # # # #
pc <- .311608
p1 <- pc - .02
p2 <- pc + .02
lx <- 33; ss <- (lx+1)/2
ssz <- seq(lx^2+lx+2, 2*lx^2-lx-1)
set.seed(20120627); ac1 <- ssi30(x=lx, p=p1, set=ssz, all=FALSE)
set.seed(20120627); ac2 <- ssi30(x=lx, p=p2, set=ssz, all=FALSE)
bnd <- asc3s(k=9, x=dim(ac1), dir=3)
fd1 <- fdc3s(acc=ac1, bnd=bnd)
fd2 <- fdc3s(acc=ac2, bnd=bnd)
n1 <- fd1$model[,"n"]; n2 <- fd2$model[,"n"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
nn1 <- predict(fd1, newdata=list(r=rr), interval="conf")
nn2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- z <- seq(lx)
y1 <- ac1[,ss,]; y2 <- ac2[,ss,]
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, z, y1, cex.main=1,
main=paste("Anisotropic set cover and\n",
"a 3D cluster in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(v=ss, lty=2)
image(x, z, y2, cex.main=1,
main=paste("Anisotropic set cover and\n",
"a 3D cluster in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(v=ss, lty=2)
plot(r1, n1, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, nn1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, n2, pch=3, ylim=range(c(n1,n2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, nn2, lty=c(1,2,2), col=c("black","red","red"))
## End(Not run)
Mass fractal dimension of sampling 2D clusters
Description
fds2s()
function uses a linear regression model for statistical estimation of the mass fractal dimension of sampling clusters on 2D square lattice with iso- & anisotropic sets cover.
Usage
fds2s(rfq=fssi20(x=95), bnd=isc2s(k=12, x=dim(rfq)))
Arguments
rfq |
relative sampling frequencies for sites of the percolation lattice. |
bnd |
bounds for the iso- or anisotropic set cover. |
Details
The mass fractal dimension for sampling clusters is equal to the coefficient of linear regression between log(w)
and log(r)
, where w
is a relative sampling frequency of the total sites which are bounded elements of iso- & anisotropic sets cover.
The isotropic set cover on 2D square lattice is formed from scalable squares with variable sizes 2r+1
and a fixed point in the lattice center.
The anisotropic set cover on 2D square lattice is formed from scalable rectangles with variable sizes r+1
and a fixed edge along the lattice boundary.
The percolation is simulated on 2D square lattice with uniformly weighted sites and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset.
Each element of the matrix rfq
is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample.
Value
A linear regression model for statistical estimation of the mass fractal dimension of sampling clusters on 2D square lattice with iso- & anisotropic sets cover.
Author(s)
Pavel V. Moskalev
References
Moskalev P.V., Grebennikov K.V. and Shitov V.V. (2011) Statistical estimation of percolation cluster parameters. Proceedings of Voronezh State University. Series: Systems Analysis and Information Technologies, No.1 (January-June), pp.29-35, arXiv:1105.2334v1; in Russian.
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example 1: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .592746
p1 <- pc - .03
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2
rf1 <- fssi20(n=100, x=lx, p=p1)
rf2 <- fssi20(n=100, x=lx, p=p2)
bnd <- isc2s(k=9, x=dim(rf1))
fd1 <- fds2s(rfq=rf1, bnd=bnd)
fd2 <- fds2s(rfq=rf2, bnd=bnd)
w1 <- fd1$model[,"w"]; w2 <- fd2$model[,"w"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
ww1 <- predict(fd1, newdata=list(r=rr), interval="conf")
ww2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- y <- seq(lx)
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, y, rf1, zlim=c(0, .7), cex.main=1,
main=paste("Isotropic set cover and\n",
"a 2D clusters frequency with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
image(x, y, rf2, zlim=c(0, .7), cex.main=1,
main=paste("Isotropic set cover and\n",
"a 2D clusters frequency with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
plot(r1, w1, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, ww1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, w2, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, ww2, lty=c(1,2,2), col=c("black","red","red"))
## Not run:
# # # # # # # # # # # # # # # # # #
# Example 2: Anisotropic set cover, dir=2
# # # # # # # # # # # # # # # # # #
pc <- .592746
p1 <- pc - .03
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2
ssy <- seq(lx+2, 2*lx-1)
rf1 <- fssi20(n=100, x=lx, p=p1, set=ssy, all=FALSE)
rf2 <- fssi20(n=100, x=lx, p=p2, set=ssy, all=FALSE)
bnd <- asc2s(k=9, x=dim(rf1), dir=2)
fd1 <- fds2s(rfq=rf1, bnd=bnd)
fd2 <- fds2s(rfq=rf2, bnd=bnd)
w1 <- fd1$model[,"w"]; w2 <- fd2$model[,"w"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
ww1 <- predict(fd1, newdata=list(r=rr), interval="conf")
ww2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- y <- seq(lx)
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, y, rf1, zlim=c(0, .7), cex.main=1,
main=paste("Anisotropic set cover and\n",
"a 2D clusters frequency with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(v=ss, lty=2)
image(x, y, rf2, zlim=c(0, .7), cex.main=1,
main=paste("Anisotropic set cover and\n",
"a 2D clusters frequency with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(v=ss, lty=2)
plot(r1, w1, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, ww1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, w2, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, ww2, lty=c(1,2,2), col=c("black","red","red"))
## End(Not run)
Mass fractal dimension of sampling 3D clusters
Description
fds3s()
function uses a linear regression model for statistical estimation of the mass fractal dimension of sampling clusters on 3D square lattice with iso- & anisotropic sets cover.
Usage
fds3s(rfq=fssi30(x=95), bnd=isc3s(k=12, x=dim(rfq)))
Arguments
rfq |
relative sampling frequencies for sites of the percolation lattice. |
bnd |
bounds for the iso- or anisotropic set cover. |
Details
The mass fractal dimension for sampling clusters is equal to the coefficient of linear regression between log(w)
and log(r)
, where w
is a relative sampling frequency of the total sites which are bounded elements of iso- & anisotropic sets cover.
The isotropic set cover on 3D square lattice is formed from scalable cubes with variable sizes 2r+1
and a fixed point in the lattice center.
The anisotropic set cover on 3D square lattice is formed from scalable cuboids with variable sizes r+1
and a fixed face along the lattice boundary.
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameter p
.
The isotropic cluster is formed from the accessible sites connected with initial sites subset.
Each element of the matrix rfq
is equal to the relative frequency with which the 3D square lattice site belongs to a cluster sample.
Value
A linear regression model for statistical estimation of the mass fractal dimension of sampling clusters on 3D square lattice with iso- & anisotropic sets cover.
Author(s)
Pavel V. Moskalev
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example 1: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .311608
p1 <- pc - .01
p2 <- pc + .01
lx <- 33; ss <- (lx+1)/2
rf1 <- fssi30(n=100, x=lx, p=p1)
rf2 <- fssi30(n=100, x=lx, p=p2)
bnd <- isc3s(k=9, x=dim(rf1))
fd1 <- fds3s(rfq=rf1, bnd=bnd)
fd2 <- fds3s(rfq=rf2, bnd=bnd)
w1 <- fd1$model[,"w"]; w2 <- fd2$model[,"w"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
ww1 <- predict(fd1, newdata=list(r=rr), interval="conf")
ww2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- z <- seq(lx)
y1 <- rf1[,ss,]; y2 <- rf2[,ss,]
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, z, y1, zlim=c(0, 3*mean(y1)), cex.main=1,
main=paste("Isotropic set cover and a 3D clusters\n",
"frequency in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
image(x, z, y2, zlim=c(0, 3*mean(y2)), cex.main=1,
main=paste("Isotropic set cover and a 3D clusters\n",
"frequency in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
plot(r1, w1, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, ww1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, w2, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, ww2, lty=c(1,2,2), col=c("black","red","red"))
## Not run:
# # # # # # # # # # # # # # # # #
# Example 2: Anisotropic set cover, dir=3
# # # # # # # # # # # # # # # # #
pc <- .311608
p1 <- pc - .01
p2 <- pc + .01
lx <- 33; ss <- (lx+1)/2
ssz <- seq(lx^2+lx+2, 2*lx^2-lx-1)
rf1 <- fssi30(n=100, x=lx, p=p1, set=ssz, all=FALSE)
rf2 <- fssi30(n=100, x=lx, p=p2, set=ssz, all=FALSE)
bnd <- asc3s(k=9, x=dim(rf1), dir=3)
fd1 <- fds3s(rfq=rf1, bnd=bnd)
fd2 <- fds3s(rfq=rf2, bnd=bnd)
w1 <- fd1$model[,"w"]; w2 <- fd2$model[,"w"]
r1 <- fd1$model[,"r"]; r2 <- fd2$model[,"r"]
rr <- seq(min(r1)-.2, max(r1)+.2, length=100)
ww1 <- predict(fd1, newdata=list(r=rr), interval="conf")
ww2 <- predict(fd2, newdata=list(r=rr), interval="conf")
s1 <- paste(round(confint(fd1)[2,], digits=3), collapse=", ")
s2 <- paste(round(confint(fd2)[2,], digits=3), collapse=", ")
x <- z <- seq(lx)
y1 <- rf1[,ss,]; y2 <- rf2[,ss,]
par(mfrow=c(2,2), mar=c(3,3,3,1), mgp=c(2,1,0))
image(x, z, y1, zlim=c(0, .3), cex.main=1,
main=paste("Anisotropic set cover and a 3D clusters\n",
"frequency in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p1, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(v=ss, lty=2)
image(x, z, y2, zlim=c(0, .3), cex.main=1,
main=paste("Anisotropic set cover and a 3D clusters\n",
"frequency in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(v=ss, lty=2)
plot(r1, w1, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s1,")", sep=""))
matlines(rr, ww1, lty=c(1,2,2), col=c("black","red","red"))
plot(r2, w2, pch=3, ylim=range(c(w1,w2)), cex.main=1,
main=paste("0.95 confidence interval for the mass\n",
"fractal dimension is (",s2,")", sep=""))
matlines(rr, ww2, lty=c(1,2,2), col=c("black","red","red"))
## End(Not run)
Isotropic set cover on the 2D square lattice
Description
isc2s()
function calculates the boundary coordinates for the isotropic set cover on the 2D square lattice with a fixed point in the lattice center.
Usage
isc2s(k=12, x=rep(95, times=2), o=(x+1)/2, r=min(o-2)^(seq(k)/k))
Arguments
k |
a maximal set cover size: |
x |
a vector of lattice sizes: |
o |
a fixed point of set cover elements: |
r |
a variable radius of set cover elements: |
Details
The percolation is simulated on 2D square lattice with uniformly weighted sites and the constant parameter p
.
The percolation cluster is formed from the accessible sites connected with initial sites subset.
If an initial cluster subset in the lattice center, to estimate the mass fractal dimension requires an isotropic set cover with a fixed point in the lattice center.
The isotropic set cover on 2D square lattice is formed from scalable squares with variable sizes 2r+1
and a fixed point in the lattice center.
Value
A list of boundary coordinates and sizes for the isotropic set cover on a 2D square lattice with a fixed point in the lattice center.
Author(s)
Pavel V. Moskalev
References
Moskalev, P.V., Grebennikov, K.V. and Shitov, V.V. (2011), Statistical estimation of percolation cluster parameters. Proceedings of Voronezh State University. Series: Systems Analysis and Information Technologies, No.1 (January-June), pp.29-35, arXiv:1105.2334v1; in Russian.
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .592746
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2
set.seed(20120627); ac2 <- ssi20(x=lx, p=p2)
bnd <- isc2s(k=9, x=dim(ac2))
x <- y <- seq(lx)
image(x, y, ac2, cex.main=1,
main=paste("Isotropic set cover and a 2D cluster of\n",
"sites with (1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["y1",], bnd["x2",], bnd["y2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)
Isotropic set cover on the 3D square lattice
Description
isc3s()
function calculates the boundary coordinates for the isotropic set cover on the 3D square lattice with a fixed point in the lattice center.
Usage
isc3s(k=12, x=rep(95, times=3), o=(x+1)/2, r=min(o-2)^(seq(k)/k))
Arguments
k |
a maximal set cover size: |
x |
a vector of lattice sizes: |
o |
a fixed point of set cover elements: |
r |
a variable radius of set cover elements: |
Details
The percolation is simulated on 3D square lattice with uniformly weighted sites and the constant parameter p
.
The percolation cluster is formed from the accessible sites connected with initial sites subset.
If an initial cluster subset in the lattice center, to estimate the mass fractal dimension requires an isotropic set cover with a fixed point in the lattice center.
The isotropic set cover on 3D square lattice is formed from scalable cubes with variable sizes 2r+1
and a fixed point in the lattice center.
Value
A list of boundary coordinates and sizes for the isotropic set cover on a 3D square lattice with a fixed point in the lattice center.
Author(s)
Pavel V. Moskalev
See Also
Examples
# # # # # # # # # # # # # # # # #
# Example: Isotropic set cover
# # # # # # # # # # # # # # # # #
pc <- .311608
p2 <- pc + .03
lx <- 33; ss <- (lx+1)/2
set.seed(20120627); ac2 <- ssi30(x=lx, p=p2)
bnd <- isc3s(k=9, x=dim(ac2))
x <- z <- seq(lx); y2 <- ac2[,ss,]
image(x, z, y2, cex.main=1,
main=paste("Isotropic set cover and\n",
"a 3D cluster of sites in the y=",ss," slice with\n",
"(1,0)-neighborhood and p=",
round(p2, digits=3), sep=""))
rect(bnd["x1",], bnd["z1",], bnd["x2",], bnd["z2",])
abline(h=ss, lty=2); abline(v=ss, lty=2)