derivateMF: 'derivateMF' derivate membership function

Description Usage Arguments Value Author(s) See Also Examples

Description

Derivate de membership of x with respect to i of MembershipFunction object heirs.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
derivateMF(object, x, i)

## S4 method for signature 'MembershipFunction'
derivateMF(object, x, i)

## S4 method for signature 'BellMF'
derivateMF(object, x, i)

## S4 method for signature 'GaussianMF'
derivateMF(object, x, i)

## S4 method for signature 'NormalizedGaussianMF'
derivateMF(object, x, i)

Arguments

object

MembershipFunction class heirs

x

numeric of the MembershipFunction to be evaluated

i

index of the ith parameter to partially derivate

Value

numeric with the value obtained from the ith derivative at x

Author(s)

Cristobal Fresno cfresno@bdmg.com.ar, Andrea S. Llera ALlera@leloir.org.ar and Elmer A. Fernandez efernandez@bdmg.com.ar

See Also

MembershipFunction-class and evaluateMF

Other Membership Functions: BellMF, BellMF-class; GaussianMF, GaussianMF-class; MembershipFunction, MembershipFunction-class; NormalizedGaussianMF, NormalizedGaussianMF-class; [,MembershipFunction-method, [<-,MembershipFunction-method, extract-methods, extract-methods; evaluateMF, evaluateMF, evaluateMF, evaluateMF, evaluateMF, evaluateMF,BellMF-method, evaluateMF,GaussianMF-method, evaluateMF,MembershipFunction-method, evaluateMF,NormalizedGaussianMF-method, evaluateMF-methods; print,MembershipFunction-method; show,MembershipFunction-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#BellMF example I
#A bell membership function with default prototype (a=1, b=1,c=0)
#The membership of x in the bell, should be 1
#The derivate of the first parameter at x, should be 0
#The derivate of the first parameter at x, should be also 0
bell <- new(Class="BellMF")
bell
evaluateMF(object=bell, x=0)
derivateMF(object=bell, x=0, i=1)
derivateMF(object=bell, x=0, i="a")
#
#BellMF example II
#A bell membership function with parameters (a=4,b=1,c=-10)
#The membership of x in the bell, should be 0.137931
#The derivate of the first parameter at x, should be 0.05945303
#The derivate on "a" at x=0, should be 0.05945303
bell2 <- new(Class="BellMF",parameters=c(a=4,b=1,c=-10))
bell2
evaluateMF(object=bell2, x=0)
derivateMF(object=bell2, x=0, i=1)
derivateMF(object=bell2, x=0, i="a")
#GaussianMF example I
#A Gaussian membership function with default prototype (mu=0, sigma=1)
#The membership of x in the gaussian, should be 1/sqrt(2*pi) = 0.3989423
#The derivate of the first parameter at x, should be 0
#The derivate on "mu" parameter at x, should be 0
gaussian <- new(Class="GaussianMF")
gaussian
evaluateMF(object=gaussian, x=0)
derivateMF(object=gaussian, x=0, i=1)
derivateMF(object=gaussian, x=0, i="mu")
#
#GaussianMF example II
#A Gaussian membership function with parameters (mu=0, sigma=1)
#The membership of x in the Gaussian, should be 1/sqrt(2*pi) = 0.3989423
#The derivate of the first parameter at x, should be 0
#The derivate on "mu" parameter at x, should be 0
gaussian2 <- new(Class="GaussianMF",parameters=c(mu=0,sigma=1))
gaussian2
evaluateMF(object=gaussian2, x=0)
derivateMF(object=gaussian2, x=0, i=1)
derivateMF(object=gaussian2, x=0, i="mu")
#NormalizedGaussianMF example I
#A normalized Gaussian membership function with default parameters (mu=0, sigma=1)
#The derivate of the first parameter at x, should be 1
#The derivate of the first parameter at x, should be 0
#The derivate on "mu" parameter at x, should be 0
normalizedGaussian <- new(Class="NormalizedGaussianMF")
normalizedGaussian
evaluateMF(object=normalizedGaussian, x=0)
derivateMF(object=normalizedGaussian, x=0, i=1)
derivateMF(object=normalizedGaussian, x=0, i="mu")
#
#NormalizedGaussianMF example II
#A normalized Gaussian membership function with parameters (mu=0, sigma=1)
#The derivate of the first parameter at x, should be 1
#The derivate of the first parameter at x, should be 0
#The derivate on "mu" parameter at x, should be 0
normalizedGaussian2 <- new(Class="NormalizedGaussianMF",
 parameters=c(mu=0,sigma=1))
normalizedGaussian2
evaluateMF(object=normalizedGaussian2, x=0)
derivateMF(object=normalizedGaussian2, x=0, i=1)
derivateMF(object=normalizedGaussian2, x=0, i="mu")

Example output

Loading required package: parallel
MembershipFunction:  Bell Membership Function 
Number of parameters: 3 
a b c 
1 1 0 
Expression: expression(1/(1 + (((x - c)/a)^2)^(b^2)))
c 
1 
b 
0 
b 
0 
MembershipFunction:  Bell Membership Function 
Number of parameters: 3 
  a   b   c 
  4   1 -10 
Expression: expression(1/(1 + (((x - c)/a)^2)^(b^2)))
       c 
0.137931 
         b 
0.05945303 
         b 
0.05945303 
MembershipFunction:  Gaussian Membership Function 
Number of parameters: 2 
   mu sigma 
    0     1 
Expression: expression(1/sqrt(2 * pi * sigma^2) * exp(-1/2 * ((x - mu)/sigma)^2))
    sigma 
0.3989423 
sigma 
    0 
sigma 
    0 
MembershipFunction:  Gaussian Membership Function 
Number of parameters: 2 
   mu sigma 
    0     1 
Expression: expression(1/sqrt(2 * pi * sigma^2) * exp(-1/2 * ((x - mu)/sigma)^2))
    sigma 
0.3989423 
sigma 
    0 
sigma 
    0 
MembershipFunction:  Normalized Gaussian Membership Function 
Number of parameters: 2 
   mu sigma 
    0     1 
Expression: expression(exp(-1/2 * ((x - mu)/sigma)^2))
mu 
 1 
sigma 
    0 
sigma 
    0 
MembershipFunction:  Normalized Gaussian Membership Function 
Number of parameters: 2 
   mu sigma 
    0     1 
Expression: expression(exp(-1/2 * ((x - mu)/sigma)^2))
mu 
 1 
sigma 
    0 
sigma 
    0 

anfis documentation built on May 2, 2019, 2:38 a.m.

Related to derivateMF in anfis...