fuzzyfuns(sets)
fuzzyfuns()所属R语言包:sets
Fuzzy membership functions
模糊隶属函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fuzzy membership and set creator functions.
模糊隶属度和组的创建者。
用法----------Usage----------
charfun_generator(FUN, height = 1)
fuzzy_tuple(FUN = fuzzy_normal, n = 5, ...,
universe = NULL, names = NULL)
is.charfun_generator(x)
fuzzy_normal(mean = NULL, sd = 1, log = FALSE, height = 1, chop = 0)
fuzzy_two_normals(mean = NULL, sd = c(1,1), log = c(FALSE, FALSE),
height = 1, chop = 0)
fuzzy_bell(center = NULL, cross = NULL, slope = 4, height = 1, chop = 0)
fuzzy_sigmoid(cross = NULL, slope = 0.5, height = 1, chop = 0)
fuzzy_trapezoid(corners = NULL, height = c(1,1), return_base_corners = TRUE)
fuzzy_triangular(corners = NULL, height = 1, return_base_corners = TRUE)
fuzzy_cone(center = NULL, radius = 2, height = 1, return_base_corners = TRUE)
fuzzy_pi3(mid = NULL, min = NULL, max = NULL, height = 1, return_base_corners = TRUE)
fuzzy_pi4(knots, height = 1, return_base_corners = TRUE)
fuzzy_normal_gset(mean = NULL, sd = 1, log = FALSE, height = 1,
chop = 0, universe = NULL)
fuzzy_two_normals_gset(mean = NULL, sd = c(1,1), log = c(FALSE, FALSE),
height = 1, chop = 0, universe = NULL)
fuzzy_bell_gset(center = NULL, cross = NULL, slope = 4, height = 1,
chop = 0, universe = NULL)
fuzzy_sigmoid_gset(cross = NULL, slope = 0.5, height = 1,
chop = 0, universe = NULL)
fuzzy_trapezoid_gset(corners = NULL, height = c(1,1), universe = NULL,
return_base_corners = TRUE)
fuzzy_triangular_gset(corners = NULL, height = 1, universe = NULL,
return_base_corners = TRUE)
fuzzy_cone_gset(center = NULL, radius = 2, height = 1, universe = NULL,
return_base_corners = TRUE)
fuzzy_pi3_gset(mid = NULL, min = NULL, max = NULL, height = 1,
universe = NULL, return_base_corners = TRUE)
fuzzy_pi4_gset(knots, height = 1,
universe = NULL, return_base_corners = TRUE)
参数----------Arguments----------
参数:x
An R object.
R对象。
参数:n
Positive integer indicating the number of sets to be created, or integer vector of location parameters used to create the sets.
正整数,表示要创建的组数或整数向量的位置参数,用于创建套。
参数:FUN
Function to be used for creating a membership function. Needs to be vectorized, i.e., is expected to take a vector of set elements and to return a vector of numeric values.
函数用于创建一个隶属函数。需要进行矢量化,即采取的向量组元素,并返回一个向量的数值。
参数:height
Numeric value in the unit interval specifying the height of the set resulting from applying the membership function to the universe, i.e., the maximum value to which the values will be scaled to.
导致从宇宙,即最大值,该值将被调整来施加的隶属函数的设定指定的高度,在单位时间间隔的数值。
参数:chop
Threshold value below which the membership function is truncated, i.e., has a value of 0.
被截断的隶属函数值,低于该阈值,即,具有0的值。
参数:center, mean
Numeric mean value(s) used for the resulting membership function.
数值的平均值()用于得到的隶属函数。
参数:sd
Numeric scale factor(s) (standard deviation(s)) used for the resulting membership function.
数字刻度因子(s)(标准偏差(s)),用于得到的隶属函数。
参数:radius
Double added/subtracted from center to get the base line corners of the cone.
从center得到的底线角落的锥形双加/减。
参数:log
Logical (vector), indicating whether normal or log-normal distributions should be used.
逻辑(矢量),指示是否应使用正常或数正态分布。
参数:cross
Double indicating the cross-over point for the sigmoidal distribution.
请双击表示为S形曲线分布的交叉点。
参数:slope
Double indicating the slope at the cross-over point.
双击表示在交叉点的斜率。
参数:corners
Double values (vector of length four) indicating the abscissas of the four corners of the resulting trapezoid.
Double值(矢量长度为4),表明所得到的梯形的四个角落的横轴表示。
参数:min, mid, max
Doubles indicating the abscissas of the three spline knots (\code{min}, 0), (\code{mid}, \code{height}) and (\code{max}, 0) the curve passes through.
双打表明(\code{min}, 0),(\code{mid}, \code{height})和(\code{max}, 0)曲线通过三个花键节的横轴表示。
参数:knots
Vector of doubles of length four indicating the abscissas of the spline knots the curve passes through.
双打长度为4的向量表示的横轴表示的样条曲线节通过。
参数:return_base_corners
Logical indicating whether membership grades for the base line corner elements should be returned as small values (.Machine$double.eps) instead of 0. Otherwise, if a set is created from the memberships, the corner elements would be removed from the set.
逻辑表示隶属度为基线角单元是否应返回作为小的值(.Machine$double.eps),而不是0。否则,如果一组创建的会员资格,角落里的元素会被从集合中删除。
参数:universe
Universal set used for computing the memberships grades.
通用设置用于计算的会员资格等级。
参数:names
optional character vector of component labels for the return value.
可选字符向量的组件标签的返回值。
参数:...
Further arguments passed to FUN.
进一步的参数传递给FUN。
Details
详细信息----------Details----------
These functions can be used to create sets with certain membership patterns.
这些函数可以被用于创建与某些成员模式集。
The core functions are function generators, taking parameters and returning a corresponding fuzzy function (i.e., with values in the unit interval). All of them are normalized, i.e., scaled to have a maximum value of height (default: 1):
这些核心职能是函数发生器,参数和返回相应的模糊函数(即在单位时间间隔的值)。所有这些都是标准化的,即有一个最大值,缩放height(默认为1):
fuzzy_normal is simply based on dnorm.
fuzzy_normal只是基于dnorm。
fuzzy_two_normals returns a function composed of the left and right parts of two normal distributions (each normalized), with possibly different means and standard
fuzzy_two_normals返回的功能由两个正态分布(每个归一化的)的左侧和右侧的部分的组成,可能使用不同的装置和标准
fuzzy_bell returns a function defined as: 1 / (1 + |(x - c) / w|) ^ 2s with center c, crossover points c +/- w, and slope at the crossover
fuzzy_bell返回一个函数定义为:1 / (1 + |(x - c) / w|) ^ 2s中心c,交叉点c +/- w,和坡度的交叉
fuzzy_sigmoid yields a function whose values are computed as <i>1 / (1 + exp{-s (x -
fuzzy_sigmoid产生一个函数,其值被计算为<i> 1 /(1 + EXP {-S( -
fuzzy_trapezoid creates a function with trapezoidal shape, defined by four corners elements and two height values for the second and third corner (the heights of
fuzzy_trapezoid创建了一个函数具有梯形的形状,由四个corners元件和两个height的值的第二个和第三个角(高度定义
fuzzy_triangular similar to the above with only three
fuzzy_triangular与上述类似,只有三个
fuzzy_cone is a special case of fuzzy_triangular, defining an isosceles triangle with corners (element, membership degree): (\code{center} - \code{radius}, 0), (\code{center}, \code{height}), and
fuzzy_cone是一个特殊的情况下,fuzzy_triangular,定义一个等边三角形的角(元素,隶属度):(\code{center} - \code{radius}, 0),(\code{center}, \code{height}),和
fuzzi_pi3 constructs a spline based on two quadratic functions, passing through the knot points (\code{min}, 0),
fuzzi_pi3两个二次函数的基础上,构建了一个样条结点通过(\code{min}, 0),
fuzzi_pi4 constructs a spline based on an S-shaped and a Z-shaped curve forming a π-shaped one, passing through the four knots (\code{knots[1]}, 0), (\code{knots[2]}, \code{height}), (\code{knots[3]}, \code{height}), and (\code{knots[4]}, 0).
fuzzi_pi4构造的样条曲线的基础上的S形和Z形曲线形成π形的一个,通过四个绳结(\code{knots[1]}, 0),(\code{knots[2]}, \code{height}),(\code{knots[3]}, \code{height})和(\code{knots[4]}, 0)。
charfun_generator takes a vectorized function as argument, returning a function normalized by height.
charfun_generator一个矢量函数作为参数,返回一个函数归height。
The fuzzy_<VAR>foo</VAR>_gset functions directly generate generalized sets from fuzzy_<VAR>foo</VAR>, using the values defined by universe, sets_options("universe"), or seq(0, 20, by = 0.1) (in that order, whichever is not NULL).
fuzzy_<VAR>foo</VAR>_gset函数直接生成广义集fuzzy_<VAR>foo</VAR>,使用定义的值由universe,sets_options("universe")或seq(0, 20, by = 0.1)(按照这个顺序,两者是不 NULL“)。
fuzzy_tuple generates a sequence of n sets based on any of the generating functions (except fuzzy_trapezoid and fuzzy_triangular). The chosen generating function FUN is called with n different values chosen along the universe passed to the first argument, thus varying the position or the resulting graph.
fuzzy_tuple产生一系列的n设置任何的发电功能的基础上(除了fuzzy_trapezoid和fuzzy_triangular)。所选择的产生功能FUN被称为n不同的值,选择沿universe传递的第一个参数,从而改变位置或生成的图形。
值----------Value----------
For charfun_generator, a generating function taking an argument list of parameters, and returning a membership function, mapping elements to membership values (from of the unit interval).
对于charfun_generator,生成函数的参数列表中的参数,并返回一个隶属函数,映射元素的隶属度值(单位间隔)。
For fuzzy_tuple, a tuple of n fuzzy sets.
fuzzy_tuple,一个元组的n模糊集。
For is.charfun_generator, a logical.
对于is.charfun_generator,一个逻辑。
For fuzzy_<VAR>foo</VAR>_gset, a fuzzy set.
对于fuzzy_<VAR>foo</VAR>_gset,模糊集。
For the other functions, a membership function.
的其他功能,会员功能。
参见----------See Also----------
set, gset, and tuple for the set types, and plot.gset for the available plot functions.
set,gset和tuple的集合类型的,和plot.gset可用的绘图功能。
实例----------Examples----------
## creating a fuzzy normal function[#创建一个模糊的正常功能]
N <- fuzzy_normal(mean = 0, sd = 1)
N(-3:3)
## create a fuzzy set with it[#创建一个模糊集]
gset(charfun = N, universe = -3:3)
## same using wrapper[#同样使用包装]
fuzzy_normal_gset(universe = -3:3)
## creating a user-defined fuzzy function[#创建一个用户定义的模糊函数]
fuzzy_poisson <- charfun_generator(dpois)
gset(charfun = fuzzy_poisson(10), universe = seq(0, 20, 2))
## creating a series of fuzzy normal sets[#创建一系列模糊正规集]
fuzzy_tuple(fuzzy_normal, 5)
## creating a series of fuzzy cones with specific locations[#创建一个与特定地点的模糊锥]
fuzzy_tuple(fuzzy_cone, c(2,3,7))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|