找回密码
 注册
查看: 271|回复: 0

R语言 seriation包 Munsingen()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 01:30:06 | 显示全部楼层 |阅读模式
Munsingen(seriation)
Munsingen()所属R语言包:seriation

                                        Hodson's Munsingen Data Set
                                         霍德森的明辛根数据集

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This data set contains a grave times artifact incidence matrix for the Celtic M眉nsingen-Rain cemetery in Switzerland as provided by  Hodson (1968) and published by Kendall 1971.
该数据集包含一个严重的次神器关联矩阵的凯尔特明辛根雨墓地在瑞士所提供的霍德森(1968年)和1971年由Kendall。


用法----------Usage----------


data("Munsingen")



格式----------Format----------

A 59 x 70 0-1 matrix. Rows (graves) and columns (artifacts)  are in the order determined by Hodson (1968).
A 59×70 0-1矩阵。行(坟墓)和列(文物)是的顺序由霍德森(1968)。


参考文献----------References----------

Hodson, F.R. (1968): The La Tene Cemetery at M眉nsingen-Rain. St盲mpfli, Bern.
Kendall, D.G. (1971): Seriation from abundance matrices. In: Hodson, F.R., Kendall, D.G. and Tautu, P., (Editors). Mathematics in the Archaeological and Historical Sciences, Edinburgh University Press, Edinburgh, 215–232.  

实例----------Examples----------


data("Munsingen")

## Seriation method after Kendall (1971)[#的系列化方法后,肯德尔(1971年)]
## Kendall's square symmetric matrix S and SoS[#肯德尔广场的对称矩阵S和SOS]
S <- function(x, w = 1) {
  sij <- function(i , j) w * sum(pmin(x[i,], x[j,]))
  h <- nrow(x)
  r <- matrix(ncol = h, nrow =h)
  for(i in 1:h) for (j in 1:h)  r[i,j] <- sij(i,j)
  r
}

SoS <- function(x) S(S(x))

## Kendall's horse shoe (Hamiltonian arc)[#Kendall的马蹄(哈密顿弧)]
horse_shoe_plot <- function(mds, sigma, threshold = mean(sigma), ...) {
    plot(mds, main = paste("Kendall's horse shoe with th =", threshold), ...)  
    l <- which(sigma > threshold, arr.ind=TRUE)
    for(i in 1:nrow(l))  lines(rbind(mds[l[i,1],], mds[l[i,2],]))
}

## shuffle data[#洗牌]
x <- Munsingen[sample(nrow(Munsingen)),]

## calculate matrix and do isoMDS (from package MASS)[#计算矩阵做isoMDS(包质量)]
sigma <- SoS(x)
library("MASS")
mds <- isoMDS(1/(1+sigma))$points

## plot Kendall's horse shoe[#图Kendall的马蹄]
horse_shoe_plot(mds, sigma)

## find order using a TSP [#为了使用TSP]
tour <- solve_TSP(insert_dummy(TSP(dist(mds)), label = "cut"),
    method = "2-opt", control = list(rep = 15))
tour <- cut_tour(tour, "cut")
lines(mds[tour,], col = "red", lwd = 2)

## create and plot order[#创建和绘制顺序]
order <- ser_permutation(tour, 1:ncol(x))
bertinplot(x, order, options= list(panel=panel.circles,
    rev = TRUE))

## compare criterion values    [#标准值的比较]
rbind(
    random = criterion(x),
    reordered = criterion(x, order),
    Hodson = criterion(Munsingen)
   )

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-20 23:50 , Processed in 0.020081 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表