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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? plots.r

?? 做主成分回歸和偏最小二乘回歸
?? R
?? 第 1 頁 / 共 2 頁
字號:
### Plots for mvr objects.  Some of them also work for other### objects, but that is not a priority.###### $Id: plots.R 148 2007-10-16 20:33:38Z bhm $###### Plot method for mvr objects###plot.mvr <- function(x, plottype = c("prediction", "validation",                        "coefficients", "scores", "loadings", "biplot",                        "correlation"),                     ...){    plottype <- match.arg(plottype)    plotFunc <- switch(plottype,                       prediction = predplot.mvr,                       validation = validationplot,                       coefficients = coefplot,                       scores = scoreplot,                       loadings = loadingplot,                       biplot = biplot.mvr,                       correlation = corrplot)    plotFunc(x, ...)}###### Scoreplot###scoreplot <- function(object, ...) UseMethod("scoreplot")scoreplot.default <- function(object, comps = 1:2, labels, identify = FALSE,                              type = "p", xlab, ylab, ...) {    ## Check arguments    nComps <- length(comps)    if (nComps == 0) stop("At least one component must be selected.")    ## Get the scores    if (is.matrix(object)) {        ## Assume this is already a score matrix        S <- object[,comps, drop = FALSE]    } else {        ## Try to get the scores        S <- scores(object)[,comps, drop = FALSE]        if (is.null(S))            stop("`", deparse(substitute(object)), "' has no scores.")    }    if (!missing(labels)) {        ## Set up point labels        if (length(labels) == 1) {            labels <- switch(match.arg(labels, c("names", "numbers")),                             names = rownames(S),                             numbers = 1:nrow(S)                             )        }        labels <- as.character(labels)        type <- "n"    }    varlab <- compnames(object, comps, explvar = TRUE)    if (nComps <= 2) {        if (nComps == 1) {            ## One component versus index            if (missing(xlab)) xlab <- "observation"            if (missing(ylab)) ylab <- varlab        } else {            ## Second component versus first            if (missing(xlab)) xlab <- varlab[1]            if (missing(ylab)) ylab <- varlab[2]        }        plot(S, xlab = xlab, ylab = ylab, type = type, ...)        if (!missing(labels)) text(S, labels, ...)        if (identify) {            if (!is.null(rownames(S))) {                identify(S, labels = rownames(S))            } else {                identify(S)            }        }    } else {        ## Pairwise scatterplots of several components        panel <- if (missing(labels))            function(x, y, ...) points(x, y, type = type, ...) else            function(x, y, ...) text(x, y, labels = labels, ...)        pairs(S, labels = varlab, panel = panel, ...)    }}## A plot method for scores:plot.scores <- function(x, ...) scoreplot(x, ...)###### Loadingplot###loadingplot <- function(object, ...) UseMethod("loadingplot")loadingplot.default <- function(object, comps = 1:2, scatter = FALSE, labels,                                identify = FALSE, type, lty, lwd = NULL, pch,                                cex = NULL, col, legendpos, xlab, ylab,                                pretty.xlabels = TRUE, xlim, ...){    ## Check arguments    nComps <- length(comps)    if (nComps == 0) stop("At least one component must be selected.")    if (!missing(type) &&        (length(type) != 1 || is.na(nchar(type, "c")) || nchar(type, "c") != 1))        stop("Invalid plot type.")    ## Get the loadings    if (is.matrix(object)) {        ## Assume this is already a loading matrix        L <- object[,comps, drop = FALSE]    } else {        ## Try to get the loadings:        L <- loadings(object)[,comps, drop = FALSE]        if (is.null(L))            stop("`", deparse(substitute(object)), "' has no loadings.")    }    varlab <- compnames(object, comps, explvar = TRUE)    if (scatter) {        ## Scatter plots        if (missing(type)) type <- "p"        if (!missing(labels)) {            ## Set up point/tick mark labels            if (length(labels) == 1) {                labels <- switch(match.arg(labels, c("names", "numbers")),                                 names = {                                     if (is.null(rnames <- rownames(L))) {                                         stop("The loadings have no row names.")                                     } else {                                         rnames                                     }},                                 numbers = 1:nrow(L)                                 )            }            labels <- as.character(labels)            type <- "n"        }        if (missing(lty)) lty <- NULL        if (missing(pch)) pch <- NULL        if (missing(col)) col <- par("col") # `NULL' means `no colour'        if (nComps <= 2) {            if (nComps == 1) {                ## One component versus index                if (missing(xlab)) xlab <- "variable"                if (missing(ylab)) ylab <- varlab            } else {                ## Second component versus first                if (missing(xlab)) xlab <- varlab[1]                if (missing(ylab)) ylab <- varlab[2]            }            plot(L, xlab = xlab, ylab = ylab, type = type, lty = lty,                 lwd = lwd, pch = pch, cex = cex, col = col, ...)            if (!missing(labels)) text(L, labels, cex = cex, col = col, ...)            if (identify)                identify(L, labels = paste(1:nrow(L), rownames(L), sep = ": "))        } else {            ## Pairwise scatterplots of several components            panel <- if (missing(labels)) {                function(x, y, ...)                    points(x, y, type = type, lty = lty, lwd = lwd,                           pch = pch, col = col, ...)            } else {                function(x, y, ...)                    text(x, y, labels = labels, col = col, ...)            }            pairs(L, labels = varlab, panel = panel, cex = cex, ...)        }    } else {                            # if (scatter)        ## Line plots        if (missing(type)) type <- "l"        if (missing(lty)) lty <- 1:nComps        if (missing(pch)) pch <- 1:nComps        if (missing(col)) col <- 1:nComps        if (missing(xlab)) xlab <- "variable"        if (missing(ylab)) ylab <- "loading value"        xnum <- 1:nrow(L)        if (missing(labels)) {            xaxt <- par("xaxt")        } else {            xaxt <- "n"            if (length(labels) == 1) {                xnam <- rownames(L)                switch(match.arg(labels, c("names", "numbers")),                       names = {        # Simply use the names as is                           labels <- xnam                       },                       numbers = {      # Try to use them as numbers                           if (length(grep("^[-0-9.]+[^0-9]*$", xnam)) ==                               length(xnam)) {                               ## Labels are on "num+text" format                               labels <- sub("[^0-9]*$", "", xnam)                               if (isTRUE(pretty.xlabels)) {                                   xnum <- as.numeric(labels)                                   xaxt <- par("xaxt")                               }                           } else {                               stop("Could not convert variable names to numbers.")                           }                       }                       )            } else {                labels <- as.character(labels)            }        }        if (missing(xlim)) xlim <- xnum[c(1, length(xnum))] # Needed for reverted scales        matplot(xnum, L, xlab = xlab, ylab = ylab, type = type,                lty = lty, lwd = lwd, pch = pch, cex = cex, col = col,                xaxt = xaxt, xlim = xlim, ...)        if (!missing(labels) && xaxt == "n") {            if (isTRUE(pretty.xlabels)) {                ticks <- axTicks(1)                ticks <- ticks[ticks >= 1 & ticks <= length(labels)]            } else {                ticks <- 1:length(labels)            }            axis(1, ticks, labels[ticks], ...)        }        if (!missing(legendpos)) {            ## Are we plotting lines?            dolines <- type %in% c("l", "b", "c", "o", "s", "S", "h")            ## Are we plotting points?            dopoints <- type %in% c("p", "b", "o")            if (length(lty) > nComps) lty <- lty[1:nComps]            do.call("legend", c(list(legendpos, varlab, col = col),                                if (dolines) list(lty = lty, lwd = lwd),                                if (dopoints) list(pch = pch, pt.cex = cex,                                                   pt.lwd = lwd)))        }        if (identify)            identify(c(row(L)), c(L),                     labels = paste(c(col(L)), rownames(L), sep = ": "))    }                                   # if (scatter)}## A plot method for loadings (loadings, loading.weights or Yloadings):plot.loadings <- function(x, ...) loadingplot(x, ...)###### Correlation loadings plot###corrplot <- function(object, comps = 1:2, labels, radii = c(sqrt(1/2), 1),                     identify = FALSE, type = "p", xlab, ylab, ...) {    nComps <- length(comps)    if (nComps < 2) stop("At least two components must be selected.")    if (is.matrix(object)) {        ## Assume this is already a correlation matrix        cl <- object[,comps, drop = FALSE]        varlab <- colnames(cl)    } else {        S <- scores(object)[,comps, drop = FALSE]        if (is.null(S))            stop("`", deparse(substitute(object)), "' has no scores.")        cl <- cor(model.matrix(object), S)        varlab <- compnames(object, comps, explvar = TRUE)    }    if (!missing(labels)) {        ## Set up point labels        if (length(labels) == 1) {            labels <- switch(match.arg(labels, c("names", "numbers")),                             names = rownames(cl),                             numbers = 1:nrow(cl)                             )        }        labels <- as.character(labels)        type <- "n"    }    ## Build the expression to add circles:    if (length(radii)) {        addcircles <- substitute(symbols(cent, cent, circles = radii,                                         inches = FALSE, add = TRUE),                                 list(cent = rep(0, length(radii))))    } else {        addcircles <- expression()    }    if (nComps == 2) {        ## Second component versus first        if (missing(xlab)) xlab <- varlab[1]        if (missing(ylab)) ylab <- varlab[2]        plot(cl, xlim = c(-1,1), ylim = c(-1,1), asp = 1,             xlab = xlab, ylab = ylab, type = type, ...)        eval(addcircles)        segments(x0 = c(-1, 0), y0 = c(0, -1), x1 = c(1, 0), y1 = c(0, 1))        if (!missing(labels)) text(cl, labels, ...)        if (identify) {            if (!is.null(rownames(cl))) {                identify(cl, labels = rownames(cl))            } else {                identify(cl)            }        }    } else {        ## Pairwise scatterplots of several components        pointsOrText <- if (missing(labels)) {            function(x, y, ...) points(x, y, type = type, ...)        } else {            function(x, y, ...) text(x, y, labels = labels, ...)        }        panel <- function(x, y, ...) {            ## Ignore the leading `ghost points':            pointsOrText(x[-(1:2)], y[-(1:2)], ...)            eval(addcircles)            segments(x0 = c(-1, 0), y0 = c(0, -1), x1 = c(1, 0),                     y1 = c(0, 1))        }        ## Call `pairs' with two leading `ghost points', to get        ## correct xlim and ylim:        pairs(rbind(-1, 1, cl), labels = varlab, panel = panel, asp = 1, ...)    }}###### prediction plot##### Generic:predplot <- function(object, ...)  UseMethod("predplot")## Default method:predplot.default <- function(object, ...) {    measured <- model.response(model.frame(object))    predicted <- predict(object)    predplotXy(measured, predicted, ...)}## Method for mvr objects:predplot.mvr <- function(object, ncomp = object$ncomp, which, newdata,                         nCols, nRows, xlab = "measured", ylab = "predicted",                         main, ..., font.main, cex.main){    ## Select type(s) of prediction    if (missing(which)) {        ## Pick the `best' alternative.        if (!missing(newdata)) {            which <- "test"        } else {            if (!is.null(object$validation)) {                which <- "validation"            } else {                which <- "train"            }        }    } else {        ## Check the supplied `which'        allTypes <- c("train", "validation", "test")        which <- allTypes[pmatch(which, allTypes)]        if (length(which) == 0 || any(is.na(which)))            stop("`which' should be a subset of ",                 paste(allTypes, collapse = ", "))    }    ## Help variables    nEst <- length(which)    nSize <- length(ncomp)    nResp <- dim(object$fitted.values)[2]    ## Set plot parametres as needed:    dims <- c(nEst, nSize, nResp)    dims <- dims[dims > 1]    nPlots <- prod(dims)    if (nPlots > 1) {        ## Set up default font.main and cex.main for individual titles:        if (missing(font.main)) font.main <- 1        if (missing(cex.main)) cex.main <- 1.1

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本高清不卡一区| 成人精品国产免费网站| 亚洲丝袜精品丝袜在线| 国产亚洲精品bt天堂精选| 日韩三区在线观看| 制服丝袜av成人在线看| 欧美人与禽zozo性伦| 7777精品伊人久久久大香线蕉完整版 | 精品精品国产高清一毛片一天堂| 91精品国产全国免费观看| 日韩一级黄色大片| 337p粉嫩大胆色噜噜噜噜亚洲| 久久网这里都是精品| 国产精品视频九色porn| 亚洲三级免费观看| 午夜私人影院久久久久| 久久成人免费电影| 成人网在线播放| 一本到高清视频免费精品| 欧美精品v日韩精品v韩国精品v| 91精品啪在线观看国产60岁| 久久蜜桃一区二区| 亚洲天堂成人在线观看| 视频在线观看一区| 国产原创一区二区| 色综合网站在线| 日韩一级高清毛片| 国产精品国产自产拍在线| 亚洲国产精品自拍| 国产一区二区三区久久悠悠色av| 91视频观看视频| 日韩欧美国产一二三区| 亚洲婷婷综合久久一本伊一区| 天天射综合影视| 成人av电影在线观看| 欧美精品v国产精品v日韩精品| 久久久综合精品| 午夜精品福利一区二区三区av | 欧美一区二区视频在线观看2022 | 亚洲不卡在线观看| 床上的激情91.| 日韩一级视频免费观看在线| 国产精品国产三级国产aⅴ中文| 日韩专区一卡二卡| 99久久婷婷国产综合精品电影| 日韩精品中文字幕一区| 一区二区三区四区在线播放 | 9人人澡人人爽人人精品| 日韩一区二区三区视频在线观看| 中文字幕中文字幕一区| 狠狠色丁香久久婷婷综| 精品视频在线免费观看| 中文字幕亚洲电影| 国产真实精品久久二三区| 666欧美在线视频| 亚洲日韩欧美一区二区在线| 国产精品一二一区| 日韩一区和二区| 日本女人一区二区三区| 99国内精品久久| 久久精品一区二区三区av| 国内精品国产成人| 精品乱人伦小说| 精品一区二区在线免费观看| 91精品国产综合久久精品| 一区二区三区国产| 日本精品一区二区三区高清| 亚洲欧洲韩国日本视频| 成人av网站在线| 国产精品久久久久久久久免费丝袜 | 欧美午夜精品久久久久久超碰| 亚洲国产经典视频| 成人av午夜影院| 中文字幕欧美一区| 91麻豆视频网站| 一级做a爱片久久| 欧美午夜电影网| 日韩激情中文字幕| 日韩三级在线观看| 国产精品资源站在线| 欧美韩国日本综合| 99精品国产视频| 一片黄亚洲嫩模| 7777精品久久久大香线蕉| 日韩成人免费看| 欧美www视频| 成人av电影在线网| 亚洲视频中文字幕| 9191久久久久久久久久久| 日本不卡123| 日本一区二区三区国色天香 | 亚洲影视资源网| 欧美日韩激情一区二区三区| 免费高清视频精品| 久久久久国产精品麻豆ai换脸| 国产二区国产一区在线观看| **欧美大码日韩| 正在播放亚洲一区| 国产精品原创巨作av| 亚洲日本va午夜在线电影| 欧美色窝79yyyycom| 久久精品理论片| 国产精品网站在线观看| 欧美在线看片a免费观看| 日本欧美一区二区三区| 国产精品全国免费观看高清 | 色综合中文字幕| 日本系列欧美系列| 国产精品国产三级国产专播品爱网 | 中文字幕亚洲精品在线观看| 欧美日韩国产成人在线免费| 国产精品自在欧美一区| 亚洲综合免费观看高清在线观看| 亚洲视频1区2区| 欧美一区二区视频在线观看| 成人动漫一区二区在线| 日韩精品久久理论片| 中文字幕+乱码+中文字幕一区| 欧美午夜精品一区二区三区| 国产成人av自拍| 日本不卡1234视频| 洋洋av久久久久久久一区| 国产日韩欧美a| 69久久99精品久久久久婷婷| 99精品视频在线免费观看| 国产一区二区三区最好精华液| 亚洲午夜久久久久久久久电影网 | 亚洲女人的天堂| 精品久久人人做人人爱| 欧美日韩在线免费视频| 成人综合在线网站| 国产精品亚洲专一区二区三区| 爽好多水快深点欧美视频| 亚洲精品自拍动漫在线| 国产精品五月天| 久久久久九九视频| 精品国产电影一区二区| 91精品婷婷国产综合久久性色 | 国产精品午夜久久| 国产亚洲va综合人人澡精品| 91精品国产综合久久精品麻豆 | 精品国产乱码久久| 欧美一级高清片| 在线播放91灌醉迷j高跟美女| av一区二区三区在线| 成人激情免费网站| 国产高清精品网站| 六月丁香婷婷色狠狠久久| 五月天一区二区| 日韩电影在线观看一区| 午夜精品久久久久久不卡8050| 亚洲成人福利片| 日韩电影免费在线| 免费成人你懂的| 精品无码三级在线观看视频| 狠狠色狠狠色综合| 国产老肥熟一区二区三区| 91福利精品视频| 色999日韩国产欧美一区二区| 色妞www精品视频| 精品视频1区2区3区| 91精品国产一区二区三区| 日韩一级片在线观看| 欧美电影免费观看高清完整版在线| 日韩免费看网站| 久久久天堂av| 中文字幕在线视频一区| 亚洲精品va在线观看| 亚洲成在人线免费| 久久国产婷婷国产香蕉| 国产成人在线电影| 91论坛在线播放| 欧美电影一区二区| 国产亚洲精品免费| 夜夜嗨av一区二区三区四季av| 视频一区中文字幕| 国产精品中文字幕一区二区三区| voyeur盗摄精品| 欧美揉bbbbb揉bbbbb| 欧美电视剧在线看免费| 国产精品国产a级| 视频一区二区三区中文字幕| 日韩 欧美一区二区三区| 国产福利91精品一区二区三区| 99re成人精品视频| 日韩视频国产视频| 综合激情成人伊人| 美女视频网站久久| 99re这里只有精品6| 欧美一区二区久久久| 国产精品国产三级国产aⅴ中文 | 国产91高潮流白浆在线麻豆| 欧美在线免费观看亚洲| 国产日韩欧美高清| 日韩精品成人一区二区三区| 国产成人免费xxxxxxxx| 色国产精品一区在线观看| 国产亚洲精品超碰| 美腿丝袜亚洲一区| 欧美在线你懂得|