pm_report {rLDCP}R Documentation

Generate the report of y

Description

It call the t function in order to generate the linguistic descriptions that better describe the output y.

Usage

pm_report(pm)

Arguments

pm

is the pm object.

Value

the description obtained after calling t.

Examples

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)

[Package rLDCP version 1.0.2 Index]