亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? kda.r

?? r軟件 另一款可以計算核估計的軟件包 需安裝r軟件
?? R
?? 第 1 頁 / 共 2 頁
字號:
    if (missing(xmin)) xmin <- apply(x, 2, min) - supp*det(Hmax)    if (missing(xmax)) xmax <- apply(x, 2, max) + supp*det(Hmax)        if (d > 4)      stop("Binning only available for 1- to 4-dim data")        if (missing(bgridsize)) bgridsize <- default.gridsize(d)    if (missing(gridsize)) gridsize <- default.gridsize(d)           fhat.list <- list()    for (j in 1:m)    {      xx <- x[x.group==grlab[j],]           H <- Hs[((j-1)*d+1) : (j*d),]                 ## compute individual density estimate      if (binned)        fhat.temp <- kde.binned(x=xx, bgridsize=bgridsize, H=H, xmin=xmin, xmax=xmax)      else if (is.null(eval.points))        fhat.temp <- kde(x=xx, H=H, supp=supp, xmin=xmin, xmax=xmax, gridsize=gridsize)      else        fhat.temp <- kde(x=xx, H=H, eval.points=eval.points)            fhat.list$estimate <- c(fhat.list$estimate, list(fhat.temp$estimate))      fhat.list$eval.points <- fhat.temp$eval.points      fhat.list$x <- c(fhat.list$x, list(xx))      fhat.list$H <- c(fhat.list$H, list(H))    }        fhat.list$x.group <- x.group    pr <- rep(0, length(grlab))    for (j in 1:length(grlab))      pr[j] <- length(which(x.group==grlab[j]))    pr <- pr/nrow(x)    fhat.list$prior.prob <- pr    fhat.list$binned <- binned        class(fhat.list) <- "kda.kde"  }    return(fhat.list)}kda.kde.1d <- function(x, x.group, hs, prior.prob, gridsize, supp, eval.points, binned, bgridsize, xmin, xmax){  grlab <- sort(unique(x.group))  m <- length(grlab)  hmax <- max(hs)  if (missing(xmin)) xmin <- min(x) - supp*hmax  if (missing(xmax)) xmax <- max(x) + supp*hmax    fhat.list <- list()  for (j in 1:m)  {    xx <- x[x.group==grlab[j]]    h <- hs[j]        ## compute individual density estimate    if (binned)      fhat.temp <- kde.binned(x=xx, h=h, xmin=xmin, xmax=xmax, bgridsize=bgridsize)    else if (is.null(eval.points))      fhat.temp <- kde(x=xx, h=h, supp=supp, xmin=xmin, xmax=xmax, gridsize=gridsize)    else      fhat.temp <- kde(x=xx, h=h, eval.points=eval.points)        fhat.list$estimate <- c(fhat.list$estimate, list(fhat.temp$estimate))    fhat.list$eval.points <- fhat.temp$eval.points    fhat.list$x <- c(fhat.list$x, list(xx))    fhat.list$h <- c(fhat.list$h, h)  }      fhat.list$H <- fhat.list$h^2  fhat.list$binned <- binned  fhat.list$x.group <- x.group    if (is.null(prior.prob))  {    pr <- rep(0, length(grlab))    for (j in 1:length(grlab))      pr[j] <- length(which(x.group==grlab[j]))    pr <- pr/length(x)    fhat.list$prior.prob <- pr  }  else    fhat.list$prior.prob <- prior.prob   class(fhat.list) <- "kda.kde"    return(fhat.list)  }################################################################################ Contour method for kda.kde cobjects################################################################################contourLevels.kda.kde <- function(x, prob, cont, nlevels=5, ...) {  fhat <- x  m <- length(fhat$x)  hts <- list()    for (j in 1:m)  {    fhatj <- list(x=fhat$x[[j]], eval.points=fhat$eval.points,                  estimate=fhat$estimate[[j]], H=fhat$H[[j]], binned=fhat$binned)    class(fhatj) <- "kde"    hts[[j]] <- contourLevels(x=fhatj, prob=prob, cont=cont, nlevels=nlevels, ...)  }     return(hts) }############################################################################### Plot KDE of individual densities and partition - only for 2-dim## Parameters# fhat - output from `kda.kde'# y - data points (separate from training data inside fhat)# y.group - data group labels# prior.prob - vector of prior probabilities# disp - "part" - plot partition#      - "" - don't plot partition##############################################################################plot.kda.kde <- function(x, y, y.group, drawpoints=FALSE, ...) {      if (is.vector(x$x[[1]]))    plotkda.kde.1d(x=x, y=y, y.group=y.group, drawpoints=drawpoints, ...)  else  {      d <- ncol(x$x[[1]])        if (d==2)      plotkda.kde.2d(x=x, y=y, y.group=y.group, drawpoints=drawpoints, ...)     else if (d==3)         plotkda.kde.3d(x=x, y=y, y.group=y.group, drawpoints=drawpoints, ...)   }}plotkda.kde.1d <- function(x, y, y.group, prior.prob=NULL, xlim, ylim, xlab="x", ylab="Weighted density function", drawpoints=FALSE, col, partcol, ptcol, lty, jitter=TRUE, ...){   fhat <- x    m <- length(fhat$x)  ##eval1 <- fhat$eval.points    if (is.null(prior.prob))    prior.prob <- fhat$prior.prob    if (m != length(prior.prob))    stop("Prior prob. vector not same length as number of components in fhat")  if (!(identical(all.equal(sum(prior.prob), 1), TRUE)))      stop("Sum of prior weights not equal to 1")  weighted.fhat <- matrix(0, nrow=length(fhat$eval.points), ncol=m)   for (j in 1:m)    weighted.fhat[,j] <- fhat$estimate[[j]]*fhat$prior.prob[j]    if (missing(xlim)) xlim <- range(fhat$eval.points)  if (missing(ylim)) ylim <- range(weighted.fhat)  if (missing(lty)) lty <- rep(1, m)  if (length(lty) < m) lty <- rep(lty, m)  if (missing(col)) col <- 1:m  if (length(col) < m) col <- rep(col, m)  if (missing(ptcol)) ptcol <- col  if (length(ptcol) < m) ptcol <- rep(ptcol, m)  if (missing(partcol)) partcol <- col  if (length(partcol) < m) partcol <- rep(partcol, m)    ## plot each training group's KDE in separate colour and line type   plot(fhat$eval.points, weighted.fhat[,1], type="l", xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim, lty=lty[1], col=col[1], ...)    if (m > 1)    for (j in 2:m)      lines(fhat$eval.points, weighted.fhat[,j], lty=lty[j], col=col[j], ...)  ##eval.points.gr <- apply(weighted.fhat, 1, which.max)  ydata <- seq(min(fhat$eval.points), max(fhat$eval.points), length=401)  ydata.gr <- kda(unlist(fhat$x), x.group=fhat$x.group, hs=fhat$h, y=ydata, prior.prob=fhat$prior.prob)  ## draw partition class as rug plot with ticks facing inwards    for (j in 1:m)    rug(ydata[ydata.gr==levels(fhat$x.group)[j]], col=partcol[j])    for (j in 1:m)  {      ## draw data points    if (drawpoints)    {      if (missing(y))        if (jitter)          rug(jitter(fhat$x[[j]]), col=ptcol[1], ticksize=-0.03)        else          rug(fhat$x[[j]], col=ptcol[1], ticksize=-0.03)      else       {        if (missing(y.group))          if (jitter)            rug(jitter(y), col=ptcol[1], ticksize=-0.03)          else            rug(y, col=ptcol[1], ticksize=-0.03)        else          if (jitter)            rug(jitter(y[y.group==levels(y.group)[j]]), col=ptcol[j], ticksize=-0.03)          else            rug(y[y.group==levels(y.group)[j]], col=ptcol[j], ticksize=-0.03)       }    }  }   }plotkda.kde.2d <- function(x, y, y.group, prior.prob=NULL,     cont=c(25,50,75), abs.cont, xlim, ylim, xlab, ylab,    drawpoints=FALSE, drawlabels=TRUE, cex=1, pch, lty, col, partcol, ptcol, ...){   fhat <- x    ##d <- 2  m <- length(fhat$x)  ##eval1 <- fhat$eval.points[[1]]  ##eval2 <- fhat$eval.points[[2]]    xtemp <- numeric()  for (j in 1:m)     xtemp <- rbind(xtemp, fhat$x[[j]])   if (missing(xlim)) xlim <- range(xtemp[,1])  if (missing(ylim)) ylim <- range(xtemp[,2])   if (missing(pch)) pch <- 1:m  if (missing(lty)) lty <- rep(1, m)  if (length(lty) < m) lty <- rep(lty, m)  if (missing(col)) col <- 1:m  if (length(col) < m) col <- rep(col, m)  if (missing(partcol)) partcol <- grey.colors(m, start=0.7, end=1)   if (missing(ptcol))    if (missing(y.group))      ptcol <- rep("blue", m)    else      ptcol <- 1:m  if (length(ptcol)==1) ptcol <- rep(ptcol, m)                x.names <- colnames(fhat$x[[1]])   if (!is.null(x.names))  {    if (missing(xlab)) xlab <- x.names[1]    if (missing(ylab)) ylab <- x.names[2]  }  else  {    xlab="x"    ylab="y"  }  if (is.null(prior.prob))    prior.prob <- fhat$prior.prob  if (m != length(prior.prob))    stop("Prior prob. vector not same length as number of components in fhat")  if (!(identical(all.equal(sum(prior.prob), 1), TRUE)))      stop("Sum of prior weights not equal to 1")  ## set up plot  if (missing(y))     plot(fhat$x[[1]], type="n", xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim, ...)  else    plot(y, type="n", xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim, ...)    ## set up common grid for all densities   class.grid <- array(0, dim=dim(fhat$est[[1]]))  temp <- matrix(0, ncol=length(fhat$est), nrow=nrow(fhat$est[[1]]))  for (j in 1:ncol(fhat$est[[1]]))  {    for (k in 1:length(fhat$est))      temp[,k] <- fhat$est[[k]][,j]* prior.prob[k]    class.grid[,j] <- max.col(temp)      }    ## draw partition  image(fhat$eval[[1]], fhat$eval[[2]], class.grid, col=partcol, xlim=xlim,        ylim=ylim, add=TRUE, ...)  box()  ## common contour levels removed from >= v1.5.3   if (missing(abs.cont))  {    hts <- contourLevels(fhat, prob=(100-cont)/100)    nhts <- length(hts[[1]])  }  else  {    hts <- abs.cont    nhts <- length(hts)  }   ## draw contours  for (j in 1:m)  {    for (i in 1:nhts)     {      if (missing(abs.cont))      {        scale <- cont[i]/hts[[j]][i]        contour(fhat$eval.points[[1]], fhat$eval.points[[2]],                 fhat$estimate[[j]]*scale, level=hts[[j]][i]*scale, add=TRUE,                 drawlabels=drawlabels, lty=lty[j], col=col[j],                ...)      }      else      {        contour(fhat$eval.points[[1]], fhat$eval.points[[2]],                 fhat$estimate[[j]], level=hts[i], add=TRUE,                 drawlabels=drawlabels, lty=lty[j], col=col[j],                ...)      }    }  }    for (j in 1:m)  {      ## draw data points    if (drawpoints)    {      if (missing(y))        points(fhat$x[[j]], pch=pch[j], col=ptcol[1], cex=cex)      else       {        if (missing(y.group))          points(y, col=ptcol[1], cex=cex)        else          points(y[y.group==levels(y.group)[j],], pch=pch[j], col=ptcol[j], cex=cex)       }    }  }   }plotkda.kde.3d <- function(x, y, y.group, prior.prob=NULL,    cont=c(25,50,75), abs.cont, colors, alphavec, xlab, ylab, zlab,    drawpoints=FALSE, size=3, ptcol="blue", ...){  require(rgl)  require(misc3d)    fhat <- x     ##d <- 3  m <- length(fhat$x)   ##eval1 <- fhat$eval.points[[1]]  ##eval2 <- fhat$eval.points[[2]]  ##eval3 <- fhat$eval.points[[3]]  if (is.null(prior.prob))    prior.prob <- fhat$prior.prob  if (m != length(prior.prob))    stop("Prior prob. vector not same length as number of components in fhat")  if (!(identical(all.equal(sum(prior.prob), 1), TRUE)))      stop("Sum of prior weights not equal to 1")  x.names <- colnames(fhat$x[[1]])  if (missing(xlab))    if (is.null(x.names)) xlab <- "x" else xlab <- x.names[1]  if (missing(ylab))    if (is.null(x.names)) ylab <- "y" else ylab <- x.names[2]  if (missing(zlab))    if (is.null(x.names)) zlab <- "z" else zlab <- x.names[3]               ##dobs <- numeric(0)  xx <- numeric(0)  for (j in 1:m)    xx <- rbind(xx, fhat$x[[j]])  ##x.gr <- sort(unique(fhat$x.group))  ##if (fhat$binned)  ##  bin.par.xx <- dfltCounts.ks(xx, gridsize=dim(fhat$est[[j]]), sqrt(diag(fhat$H[[j]])), supp=3.7)  ## common contour levels removed from >= v1.5.3   if (missing(abs.cont))  {    hts <- contourLevels(fhat, prob=(100-cont)/100)    nhts <- length(hts[[1]])  }  else  {    hts <- abs.cont    nhts <- length(hts)  }    if (missing(alphavec)) alphavec <- seq(0.1,0.3,length=nhts)  if (missing(colors)) colors <- rainbow(m)  if (missing(ptcol))    if (missing(y.group))      ptcol <- rep("blue", m)    else      ptcol <- 1:m  if (length(ptcol)==1) ptcol <- rep(ptcol, m)    clear3d()  ##bg3d(color="white")  plot3d(x=fhat$eval.points[[1]], y=fhat$eval.points[[2]],         z=fhat$eval.points[[3]], type="n", xlab=xlab, ylab=ylab, zlab=zlab,         ...)    for (j in 1:m)  {    for (i in 1:nhts)       contour3d(x=fhat$eval.points[[1]], y=fhat$eval.points[[2]],                z=fhat$eval.points[[3]], f=fhat$estimate[[j]],                level=hts[[j]][nhts-i+1],                add=TRUE, alpha=alphavec[i], color=colors[j],...)    if (drawpoints)   ## plot points    {      if (missing(y))        points3d(fhat$x[[j]][,1], fhat$x[[j]][,2], fhat$x[[j]][,3],                    color=ptcol[j], size=size, alpha=1)      else      {        if (missing(y.group))          points3d(y[,1], y[,2], y[,3], color=ptcol, size=size, alpha=1)        else        {          y.temp <- y[y.group==levels(y.group)[j],]          if (nrow(y.temp)>0)            points3d(y.temp[,1], y.temp[,2], y.temp[,3], color=ptcol[j], size=size, alpha=1)        }      }    }  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美区在线观看| 成人午夜精品一区二区三区| 欧美日韩二区三区| 首页国产欧美久久| 欧美一区二区三区日韩| 国产自产v一区二区三区c| 久久久久久麻豆| 99久久99久久精品免费观看| 亚洲夂夂婷婷色拍ww47| 91精品国产91久久久久久最新毛片| 日本亚洲最大的色成网站www| 精品国产凹凸成av人导航| 国产成人精品一区二区三区四区| 国产精品乱子久久久久| 欧亚一区二区三区| 精品一区二区在线免费观看| 国产女主播在线一区二区| 在线视频国内自拍亚洲视频| 日本成人在线不卡视频| 欧美国产国产综合| 欧美日韩亚洲国产综合| 久久99精品久久久久久动态图| 国产欧美精品区一区二区三区| 欧美亚洲国产一区在线观看网站 | 欧美日韩亚洲另类| 国内精品伊人久久久久影院对白| 国产精品人成在线观看免费| 欧美日韩午夜在线视频| 国产精品白丝av| 亚洲成在人线在线播放| 久久精品水蜜桃av综合天堂| 色综合久久综合网欧美综合网| 蜜桃久久av一区| 亚洲私人黄色宅男| 精品久久久久久久一区二区蜜臀| 成av人片一区二区| 久久精品久久精品| 一区二区三区国产精品| 久久久久久久久久久久久久久99| 欧美最猛黑人xxxxx猛交| 国产99精品视频| 日韩电影在线观看电影| 亚洲三级在线免费观看| 久久午夜电影网| 欧美福利一区二区| 色香蕉成人二区免费| 国内精品免费在线观看| 日韩综合在线视频| 亚洲日本va午夜在线影院| 欧美mv日韩mv国产| 欧美伦理视频网站| 91免费看视频| av在线不卡电影| 国产精品综合一区二区| 亚洲超丰满肉感bbw| 一区二区三区日韩欧美| 国产精品你懂的| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 精品999在线播放| 欧美日韩国产综合视频在线观看| av激情亚洲男人天堂| 国产精品99久久久久久有的能看| 青青草97国产精品免费观看无弹窗版| 亚洲精品欧美专区| 亚洲精品欧美在线| 一区二区三区日本| 一区二区三区美女| 亚洲综合色在线| 中文字幕亚洲综合久久菠萝蜜| 国产免费久久精品| 国产欧美日韩精品一区| 国产欧美日韩精品a在线观看| 精品国产91乱码一区二区三区| 91精品福利在线一区二区三区 | 亚洲成人动漫精品| 亚洲电影视频在线| 午夜久久久影院| 偷拍日韩校园综合在线| 日韩专区欧美专区| 日韩高清在线一区| 久久精工是国产品牌吗| 久88久久88久久久| 国产中文字幕精品| 懂色av一区二区三区免费看| 成人av手机在线观看| 91丨九色丨尤物| 在线中文字幕不卡| 欧美日韩国产123区| 日韩欧美一级精品久久| 久久美女艺术照精彩视频福利播放 | 国产乱码精品一区二区三| 国产传媒一区在线| av欧美精品.com| 欧美视频日韩视频在线观看| 4438成人网| 久久亚洲一区二区三区明星换脸 | 久久久久久97三级| 中文字幕在线观看不卡| 一区二区三区不卡视频| 日韩不卡一区二区| 国产成人午夜精品影院观看视频 | 欧美一区二区三区白人| 久久这里都是精品| 亚洲精品亚洲人成人网在线播放| 午夜日韩在线观看| 国产一区二区h| 91老师国产黑色丝袜在线| 欧美亚洲国产一区在线观看网站| 欧美一级欧美一级在线播放| 欧美激情一区三区| 亚洲综合另类小说| 黄页视频在线91| 91女人视频在线观看| 6080亚洲精品一区二区| 国产欧美日韩另类一区| 亚洲成人一二三| 国产精品一区免费视频| 欧美视频你懂的| 久久久国际精品| 亚洲小少妇裸体bbw| 国产经典欧美精品| 欧美精品在线一区二区三区| 久久九九久精品国产免费直播| 亚洲第一福利一区| 大尺度一区二区| 日韩欧美一区二区视频| 亚洲乱码国产乱码精品精的特点| 久久国产成人午夜av影院| 色婷婷精品大在线视频| 久久网站最新地址| 天天操天天干天天综合网| 91视视频在线直接观看在线看网页在线看 | 国产丝袜欧美中文另类| 亚洲v中文字幕| 99视频一区二区| www国产精品av| 日韩成人免费看| 91福利视频网站| 国产精品国产馆在线真实露脸| 经典三级一区二区| 欧美日精品一区视频| 国产精品不卡一区二区三区| 激情文学综合网| 欧美一区二区三区四区久久| 日韩欧美第一区| 综合久久久久久| 国产91色综合久久免费分享| 欧美mv日韩mv亚洲| 琪琪久久久久日韩精品| 欧美性视频一区二区三区| 国产精品进线69影院| 国产成人免费视频一区| 26uuu欧美日本| 精品伊人久久久久7777人| 欧美一区二区三区免费视频| 亚洲午夜国产一区99re久久| 91在线播放网址| 亚洲国产成人午夜在线一区| 高清不卡在线观看| 欧美国产日韩亚洲一区| 国产91精品免费| 欧美国产日韩在线观看| 成人视屏免费看| 欧美韩国一区二区| 99热在这里有精品免费| 中文字幕一区二| 91免费看`日韩一区二区| 亚洲欧美日韩一区| 在线免费观看日韩欧美| 一区二区成人在线| 欧美日韩国产高清一区| 亚洲国产wwwccc36天堂| 欧美日韩精品免费观看视频| 午夜欧美在线一二页| 欧美一级黄色录像| 精品一区二区三区免费观看| 久久久夜色精品亚洲| 福利一区福利二区| 亚洲日本丝袜连裤袜办公室| 91久久精品网| 日韩精品福利网| 精品成人一区二区三区四区| 国产精品一二一区| 成人免费一区二区三区视频| 欧美亚洲动漫制服丝袜| 秋霞午夜鲁丝一区二区老狼| 2021国产精品久久精品 | 成人美女视频在线观看18| 国产精品人成在线观看免费| 91免费小视频| 手机精品视频在线观看| 久久女同精品一区二区| jlzzjlzz亚洲女人18| 午夜精品久久久久久不卡8050| 欧美变态凌虐bdsm| 91美女片黄在线观看| 日本不卡一区二区三区高清视频| 国产偷国产偷精品高清尤物| 91浏览器入口在线观看| 美美哒免费高清在线观看视频一区二区 |