Description Usage Arguments Value Examples
It call the t
function in order to generate the linguistic
descriptions that better describe the output y
.
1 |
pm |
is the |
the description obtained after calling t
.
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 | cp_frame <- cp("cp_frame", c("bad",
"middle",
"good"))
g_frame <- function(u,y){
operator <- operator(min, max)
y$w<- infer_rules(fuzzy_rules( fuzzy_rule(0,0,1,0,0, 0,0,1,0,0, 0,0,1,0,0, 0,0,1),
fuzzy_rule(1,1,1,1,1, 1,1,1,1,1, 1,1,0,1,1, 1,0,0),
fuzzy_rule(1,1,1,1,1, 1,0,0,0,1, 0,0,1,0,0, 1,0,0),
fuzzy_rule(1,0,0,0,1, 1,1,1,1,1, 0,0,1,0,0, 1,0,0),
fuzzy_rule(0,1,0,1,0, 0,1,0,1,0, 0,0,1,0,0, 0,1,0)),
operator,
list(u[[1]]$w,u[[2]]$w,u[[3]]$w))
y
}
t_frame <- function(y){
templates <- c("It has been taken a bad framed photo",
"It has been taken a middle framed photo",
"It has been taken a good framed photo")
return( templates[which.max(y$w)])
}
pm_frame <- pm(y=cp_frame, g=g_frame, t=t_frame)
pm_report(pm_frame)
|
[1] "It has been taken a bad framed photo"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.