costMatrix(tilingArray)
costMatrix()所属R语言包:tilingArray
Segmentation cost matrix
分割成本矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function calculates the cost matrix for the segmentation model
此函数计算的成本矩阵分割模型
用法----------Usage----------
costMatrix(x, maxk)
参数----------Arguments----------
参数:x
Numeric vector of length n or matrix with n rows and d columns, where n is the number of sample points and d the number of replicate measurements (e.g. from multiple arrays).
数字矢量长度n与n行d列,矩阵n是采样点的数量和d重复测量(例如,从多个阵列)。
参数:maxk
Positive integer.
正整数。
Details
详情----------Details----------
See the package vignette Calculation of the cost matrix.
看到包小插曲计算成本矩阵。
值----------Value----------
Matrix with maxk rows and length(x) columns.
矩阵maxk行length(x)列。
作者(S)----------Author(s)----------
W. Huber
举例----------Examples----------
d = 4
x = apply(matrix(rnorm(200), ncol=d), 2, cumsum)
maxk = 50
G = costMatrix(x, maxk=maxk)
G.pedestrian = matrix(NA, nrow=nrow(G), ncol=ncol(G))
for(i in 1ncol(G)))
for(k in 1:min(nrow(G), nrow(x)-i+1))
G.pedestrian[k, i] = (k*d-1)*var(as.vector(x[ii+k-1), ]))
stopifnot(identical(is.na(G), is.na(G.pedestrian)))
stopifnot(max(abs(G-G.pedestrian), na.rm=TRUE) <= 1e-6)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|