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

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

?? mvrval.r

?? 做主成分回歸和偏最小二乘回歸
?? R
字號:
### mvrVal.R: Functions for calculating validation statistics, such### as MSEP, RMSEP and R2, for mvr objects.###### $Id: mvrVal.R 117 2007-06-26 12:57:53Z bhm $## Calculate the validation statistics needed for (R)MSEP and R^2.## Note that it accepts any values for `estimate', but only calculates## statistics for "train", "test" and "CV".mvrValstats <- function(object, estimate,                        newdata, ncomp = 1:object$ncomp, comps,                        intercept = cumulative, se = FALSE, ...){    ## Makes the code slightly simpler:    cumulative <- missing(comps) || is.null(comps)    if (any(estimate == "CV")) {        ## Check that cross-validation is possible:        if (!cumulative)            stop("Cross-validation is not supported when `comps' is specified")        if (is.null(object$validation))            stop("`object' has no `validation' component")    }    ## The calculated stuff:    nestimates <- length(estimate)    nresp <- dim(fitted(object))[2]    respnames <- dimnames(fitted(object))[[2]]    SSE <- array(dim = c(nestimates, nresp,                         if(cumulative) 1 + length(ncomp) else 2),                 dimnames = list(estimate = estimate,                 response = respnames,                 model = if (cumulative) {                     c("(Intercept)", paste(ncomp, "comps"))                 } else {                     c("(Intercept)", paste("(Intercept), Comp",                                            paste(comps, collapse = ", ")))                 }                 ))    SST <- array(dim = c(nestimates, nresp),                 dimnames = list(estimate = estimate, response = respnames))    nobj <- numeric(nestimates)    names(nobj) <- estimate    ## Calculate the statistics:    for (i in seq(along = estimate)) {        switch(estimate[i],               train = {                   resp <- as.matrix(model.response(model.frame(object)))                   nobj[i] <- nrow(resp)                   if (inherits(object$na.action, "exclude")) {                       resp <- napredict(object$na.action, resp) # inserts NAs                   }                   res <- if (cumulative)                       residuals(object, ...)[,,ncomp, drop=FALSE]                   else                       resp - predict(object, comps = comps, ...)                   SST[i,] <- apply(resp, 2, var, na.rm = TRUE) *                       (nobj[i] - 1)                   SSE[i,,] <- cbind(SST[i,], colSums(res^2, na.rm = TRUE))               },               test = {                   if (missing(newdata)) stop("Missing `newdata'.")                   ## Remove any observations with NAs:                   newdata <- model.frame(formula(object), data = newdata)                   resp <- as.matrix(model.response(newdata))                   pred <- if (cumulative)                       predict(object, ncomp = ncomp, newdata = newdata,...)                   else                       predict(object, comps = comps, newdata = newdata,...)                   nobj[i] <- nrow(newdata)                   SST[i,] <- apply(resp, 2, var) * (nobj[i] - 1)                   SSE[i,,] <- cbind(colSums(sweep(resp, 2, object$Ymeans)^2),                                    colSums((pred - c(resp))^2))               },               CV = {                   resp <- as.matrix(model.response(model.frame(object)))                   nobj[i] <- nrow(resp)                   SST[i,] <- apply(resp, 2, var) * (nobj[i] - 1)                   SSE[i,,] <-                       cbind(object$validation$PRESS0,                             object$validation$PRESS[,ncomp, drop=FALSE])               }               )    }    if (cumulative) comps <- ncomp    ## Either remove the intercept or add a "zeroth" component:    if (intercept)        comps <- c(0, comps)    else        SSE <- SSE[,,-1, drop=FALSE]    return(list(SSE = SSE, SST = SST, nobj = nobj, comps = comps,                cumulative = cumulative))}## R2: Return R^2R2 <- function(object, estimate, newdata, ncomp = 1:object$ncomp, comps,               intercept = cumulative, se = FALSE, ...) {    ## Makes the code slightly simpler:  FIXME: maybe remove    cumulative <- missing(comps) || is.null(comps)    ## Figure out which estimate(s) to calculate:    allEstimates <- c("all", "train", "CV", "test")    if (missing(estimate)) {        ## Select the `best' available estimate        if (!missing(newdata)) {            estimate = "test"        } else {            if (!is.null(object$validation)) {                estimate = "CV"            } else {                estimate = "train"            }        }    } else {        estimate <- allEstimates[pmatch(estimate, allEstimates)]        if (any(is.na(estimate))) stop("`estimate' should be a subset of ",                                       paste(allEstimates, collapse = ", "))        if (any(estimate == "all")) {            estimate <- allEstimates[-1] # Try all estimates (except "all")            if(missing(newdata)) estimate <- setdiff(estimate, "test")            if(is.null(object$validation) || !cumulative)                estimate <- setdiff(estimate, "CV")        }    }    ## Get the needed validation statistics:    cl <- match.call(expand.dots = FALSE)    cl$estimate <- estimate             # update estimate argument    cl[[1]] <- as.name("mvrValstats")    valstats <- eval(cl, parent.frame())    ## Calculate the R^2s:    R2 <- 1 - valstats$SSE / c(valstats$SST)    return(structure(list(val = R2, type = "R2", comps = valstats$comps,                          cumulative = valstats$cumulative, call = match.call()),                     class = "mvrVal"))}## MSEP: Return MSEPMSEP <- function(object, ...) UseMethod("MSEP")MSEP.mvr <- function(object, estimate, newdata, ncomp = 1:object$ncomp, comps,                       intercept = cumulative, se = FALSE, ...){    ## Makes the code slightly simpler:    cumulative <- missing(comps) || is.null(comps)    ## Figure out which estimate(s) to calculate:    allEstimates <- c("all", "train", "CV", "adjCV", "test")    if (missing(estimate)) {        ## Select the `best' available estimate        if (!missing(newdata)) {            estimate = "test"        } else {            if (!is.null(object$validation)) {                estimate = c("CV", "adjCV")            } else {                estimate = "train"            }        }    } else {        estimate <- allEstimates[pmatch(estimate, allEstimates)]        if (any(is.na(estimate))) stop("`estimate' should be a subset of ",                                       paste(allEstimates, collapse = ", "))        if (any(estimate == "all")) {            estimate <- allEstimates[-1] # Try all estimates (except "all")            if(missing(newdata)) estimate <- setdiff(estimate, "test")            if(is.null(object$validation) || !cumulative)                estimate <- setdiff(estimate, c("CV", "adjCV"))        }    }    ## adjCV needs the statistics for CV and train, so we optionally    ## have to add them:    if (adjCV <- any(estimate == "adjCV")) {        ## Note: this removes any duplicate elements        calcestimates <- union(estimate, c("train", "CV"))    } else {        calcestimates <- estimate    }    ## Get the needed validation statistics:    cl <- match.call(expand.dots = FALSE)    cl$estimate <- calcestimates        # update estimate argument    cl[[1]] <- as.name("mvrValstats")    valstats <- eval(cl, parent.frame())    ## Calculate the MSEPs:    MSEP <- valstats$SSE / valstats$nobj    if (adjCV) {        ## Calculate the adjusted CV        MSEP["adjCV",,] <- MSEP["CV",,]        if (intercept) {            MSEP["adjCV",,-1] <- MSEP["adjCV",,-1] + MSEP["train",,-1] -                object$validation$adj[,ncomp]        } else {            MSEP["adjCV",,] <- MSEP["adjCV",,] + MSEP["train",,] -                object$validation$adj[,ncomp]        }        ## Remove any specially added estimates (this also adds back any        ## duplicate elements):        MSEP <- MSEP[estimate,,, drop=FALSE]    }    return(structure(list(val = MSEP, type = "MSEP", comps = valstats$comps,                          cumulative = valstats$cumulative, call = match.call()),                     class = "mvrVal"))}# RMSEP: A wrapper around MSEP to calculate RMSEPsRMSEP <- function(object, ...) UseMethod("RMSEP")RMSEP.mvr <- function(object, ...) {    cl <- match.call()    cl[[1]] <- as.name("MSEP")    z <- eval(cl, parent.frame())    z$val <- sqrt(z$val)    z$type <- "RMSEP"    z$call[[1]] <- as.name("RMSEP")    z}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日产国产高清一区二区三区| 国产中文字幕一区| 精品亚洲欧美一区| av亚洲精华国产精华精华 | 99国产精品久| 欧美日韩视频一区二区| 国产精品免费久久| 狠狠色伊人亚洲综合成人| 欧美在线观看一二区| 久久九九99视频| 麻豆精品精品国产自在97香蕉 | ㊣最新国产の精品bt伙计久久| 青青草一区二区三区| 色综合久久中文综合久久97| 国产三级精品三级| 九九九久久久精品| 5月丁香婷婷综合| 亚洲伊人伊色伊影伊综合网| 一本色道**综合亚洲精品蜜桃冫| 国产精品理论在线观看| 国产一区二区福利视频| 欧美大尺度电影在线| 婷婷开心激情综合| 91黄色激情网站| 亚洲你懂的在线视频| 不卡一区二区三区四区| 国产精品丝袜久久久久久app| 紧缚奴在线一区二区三区| 91精品麻豆日日躁夜夜躁| 午夜精彩视频在线观看不卡| 欧美在线制服丝袜| 亚洲国产婷婷综合在线精品| 欧美性色综合网| 亚洲综合在线电影| 欧美午夜理伦三级在线观看| 夜夜操天天操亚洲| 欧美三级视频在线观看| 天堂一区二区在线| 欧美一区二区三区思思人| 麻豆传媒一区二区三区| 精品福利二区三区| 国产精品99久久久久久久女警| 国产亚洲精品中文字幕| 成人免费视频视频在线观看免费| 国产精品嫩草99a| 99久久精品情趣| 亚洲自拍另类综合| 欧美一区二区女人| 国产精品夜夜嗨| 亚洲图片你懂的| 欧美美女一区二区在线观看| 美国av一区二区| 国产视频一区在线播放| 成人aa视频在线观看| 一区二区三区在线高清| 欧美高清精品3d| 国产成人av在线影院| 最新国产成人在线观看| 欧美日韩国产在线观看| 精品一区二区久久久| 亚洲欧洲av一区二区三区久久| 色婷婷综合视频在线观看| 日韩1区2区日韩1区2区| 国产婷婷一区二区| 欧美视频日韩视频在线观看| 精品亚洲成a人| 亚洲视频一区在线| 日韩一区二区影院| 成人免费视频免费观看| 日韩精品91亚洲二区在线观看| 国产欧美一区二区精品性色超碰 | 成人久久久精品乱码一区二区三区| 亚洲欧美日本韩国| 精品日韩一区二区三区免费视频| caoporn国产精品| 喷水一区二区三区| 亚洲另类在线视频| 亚洲精品一区二区三区福利| 色噜噜狠狠色综合中国| 久久99久国产精品黄毛片色诱| 日韩一区欧美一区| 日韩欧美一级片| 在线观看日韩国产| 成人综合婷婷国产精品久久蜜臀 | 亚洲午夜精品17c| 久久精品一区二区三区不卡| 欧美性xxxxxxxx| www.欧美.com| 国产精品中文字幕日韩精品| 午夜国产精品一区| 一区二区不卡在线播放| 国产日产欧美一区二区视频| 日韩久久精品一区| 欧美日韩精品系列| 在线观看一区不卡| 91视频国产观看| 粉嫩绯色av一区二区在线观看 | 精品国产精品网麻豆系列 | 亚洲综合精品自拍| 国产精品久久久久久久久动漫| 91精品福利在线一区二区三区| 91极品视觉盛宴| 99视频在线观看一区三区| 国产尤物一区二区| 久久99精品国产麻豆婷婷 | 国产不卡在线播放| 麻豆91精品91久久久的内涵| 五月开心婷婷久久| 亚洲成人黄色影院| 一区二区三区av电影| 一区二区三区资源| 亚洲天堂成人在线观看| 中文字幕日韩一区| 国产精品国产三级国产普通话99 | 美腿丝袜一区二区三区| 五月综合激情婷婷六月色窝| 亚洲丶国产丶欧美一区二区三区| 亚洲一区在线视频| 日韩精品亚洲一区二区三区免费| 亚洲成人免费看| 欧美aaaaa成人免费观看视频| 天堂成人国产精品一区| 免费看日韩精品| 久久99精品久久久| 国产精品1区二区.| 99精品热视频| 色婷婷亚洲一区二区三区| 色网综合在线观看| 欧美日韩不卡一区| 日韩精品专区在线影院重磅| 久久综合资源网| 中文字幕日本乱码精品影院| 亚洲欧美偷拍三级| 亚洲国产欧美在线人成| 视频一区二区国产| 国产精品12区| 色婷婷综合久色| 日韩一区二区三区视频在线观看 | 国产一区美女在线| 成人性生交大片免费看视频在线 | 精品国产一区二区三区忘忧草| 日韩免费观看2025年上映的电影| 亚洲精品在线电影| 综合久久国产九一剧情麻豆| 五月婷婷综合网| 国产aⅴ精品一区二区三区色成熟| 91麻豆免费观看| 欧美大尺度电影在线| 日本一二三四高清不卡| 亚洲自拍另类综合| 国产裸体歌舞团一区二区| 91色婷婷久久久久合中文| 欧美一区二区视频网站| 国产精品色婷婷| 免费xxxx性欧美18vr| caoporn国产精品| 欧美一区二区三区免费观看视频 | a级精品国产片在线观看| 欧美日韩在线三区| 国产女人18水真多18精品一级做| 一区二区三区高清在线| 国产精品一区二区91| 欧美日韩精品是欧美日韩精品| 日本一区二区三区久久久久久久久不| 亚洲一卡二卡三卡四卡| 国产寡妇亲子伦一区二区| 欧美蜜桃一区二区三区| 中文字幕亚洲区| 国产美女视频91| 欧美丰满一区二区免费视频| 亚洲人成7777| 粗大黑人巨茎大战欧美成人| 精品国产免费人成在线观看| 亚洲一区二三区| 一本色道综合亚洲| 欧美国产激情二区三区| 九九国产精品视频| 91精品欧美综合在线观看最新| 亚洲男人的天堂在线观看| 国产白丝精品91爽爽久久| 日韩欧美的一区| 日韩激情一区二区| 欧美吻胸吃奶大尺度电影| 亚洲男人的天堂在线观看| 国产mv日韩mv欧美| 久久久久久久久久美女| 久久精品国产免费| 制服丝袜亚洲色图| 性久久久久久久| 在线观看国产91| 亚洲美女精品一区| 99久久综合狠狠综合久久| 久久精品视频免费| 国产精品一二三四区| 久久免费看少妇高潮| 国产成人亚洲综合色影视| 久久精品免费在线观看| 国产高清成人在线| 国产日韩欧美不卡在线| 高清在线不卡av|