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

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

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

                                        Registry for criterion methods
                                         注册表标准方法

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

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

A registry to manage methods to calculate a criterion value given data and a permutation.
注册表管理的方法来计算的标准值给定的数据和置换。


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


list_criterion_methods(kind)
show_criterion_methods(kind)
get_criterion_method(kind, name)
set_criterion_method(kind, name, definition, description = NULL, merit = NA, ...)



参数----------Arguments----------

参数:kind
the data type the method works on. For example, "dist", "matrix" or "array".
的数据类型的方法的工作。例如,"dist","matrix"或"array"。


参数:name
a short name for the method used to refer to the method in the function criterion().
一个简短的名称使用的方法中的方法,提及的功能criterion()。


参数:definition
a function containing the method's code.
一个功能包含方法的代码。


参数:description
a description of the method. For example, a long name.
的方法的描述。例如,一个长文件名。


参数:merit
a boolean indicating if the criterion measure is a merit (TRUE) or a loss (FALSE) measure.
一个布尔值,指示是否标准衡量是一个优点(TRUE)或亏损(FALSE)测量。


参数:...
further information that is stored for the method in the  registry.
进一步的信息存储在注册表的方法。


Details

详细信息----------Details----------

list_criterion_method() lists all available methods for a given data type (kind). The result is a vector of character strings with the short names of the methods.
list_criterion_method()列出所有可用的方法对于一个给定的数据类型(kind)。的结果是一个向量的字符的字符串的方法的短名称。

show_criterion_method() shows all available methods for a given data type (kind) including a description.
show_criterion_method()显示所有可用的方法包括描述给定数据类型(kind)。

get_criterion_method() returns information (including the implementing function) about a given method in form of an object of class "criterion_method".
get_criterion_method()返回的信息(包括执行功能)对一个给定的方法的对象的类"criterion_method"的形式。

With set_criterion_method() new criterion methods can be added by the  user. The implementing function (definition) needs to have the formal arguments x, order, ..., where x is the data object, order is an object of class permutation_vector and ... can contain additional information for the method passed on from criterion(). The implementation has to return the criterion value as a scalar.
随着set_criterion_method()新的标准方法,可以由用户添加。执行功能(definition)需要有正式的参数x, order, ...,x是数据对象,顺序是对象类permutation_vector和...可以包含额外信息的方法,通过从criterion()。实施返回一个标量的标准值。


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


list_criterion_methods("dist")

show_criterion_methods("dist")

get_criterion_method("dist", "AR_d")

## define a new method[#定义了一种新方法]

## a function that return sum of the diagonal elements[#一个函数,返回的对角线元素的总和]
criterion_method_matrix_foo <- function(x, order, ...) {
if(!is.null(order)) x <- permute(x,order)
    sum(diag(x))
}

## set new method[#设置新方法]
set_criterion_method("matrix", "foo", criterion_method_matrix_foo,
    "foo: a useless demo criterion", FALSE)

list_criterion_methods("matrix")

##use all criterion methods (including the new one)[#使用所有标准的方法(包括新)]
criterion(matrix(1:9, ncol=3))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-21 00:07 , Processed in 0.029719 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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