pm_infer: Call the g function

Description Usage Arguments Value See Also Examples

Description

It call the g function in order to make the inference, i.e., map inputs u to output y.

Usage

1

Arguments

pm

is the pm object.

u

is the new pm input. By default is NULL.

Value

the pm obtained after calling g.

See Also

cp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
cp_depth <- cp("cp_depth", c("far",
                           "bit far",
                           "good",
                           "close",
                           "very close"))

g_depth <- function(u,y){
   y$w <- degree_mf(fuzzy_partitions(triangle_mf(450,450,550),
                                              triangle_mf( 450,550,600),
                                              trapezoid_mf(550,600,800, 1000),
                                              triangle_mf( 800,1000,1300),
                                              trapezoid_mf( 1000,1300,1500,1500)),u)
 y
}

pm_depth  <- pm(y=cp_depth, g=g_depth)
pm_depth   <- pm_infer(pm_depth, 650)

rLDCP documentation built on May 2, 2019, 2:30 a.m.

Related to pm_infer in rLDCP...