The predicting function for rule induction methods based on FRST

Share:

Description

It is a function used to obtain predicted values after obtaining rules by using rule induction methods. We have provided the functions RI.GFRS.FRST and RI.hybridFS.FRST to generate rules based on FRST.

Usage

1
2
## S3 method for class 'RuleSetFRST'
predict(object, newdata, ...)

Arguments

object

a "RuleSetFRST" class resulted by RI.GFRS.FRST and RI.hybridFS.FRST.

newdata

a "DecisionTable" class containing a data frame or matrix (m x n) of data for the prediction process, where m is the number of instances and n is the number of input attributes. It should be noted that this data must have colnames on each attributes.

...

the other parameters.

Value

The predicted values.

Author(s)

Lala Septem Riza

See Also

RI.indiscernibilityBasedRules.RST, RI.GFRS.FRST and RI.hybridFS.FRST

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
##############################################
## Example: Classification Task
##############################################
data(RoughSetData)
decision.table <- RoughSetData$pima7.dt

## using RI.hybrid.FRST for generating rules
control <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
           type.relation = c("tolerance", "eq.1"), t.implicator = "lukasiewicz")
rules.hybrid <- RI.hybridFS.FRST(decision.table, control)

## in this case, we are using the same data set as the training data
res.1 <- predict(rules.hybrid, decision.table[, -ncol(decision.table)])

## using RI.GFRS.FRST for generating rules
control <- list(alpha.precision = 0.01, type.aggregation = c("t.tnorm", "lukasiewicz"),
                type.relation = c("tolerance", "eq.3"), t.implicator = "lukasiewicz")
rules.gfrs <- RI.GFRS.FRST(decision.table, control)

## in this case, we are using the same data set as the training data
res.2 <- predict(rules.gfrs, decision.table[, -ncol(decision.table)])

##############################################
## Example: Regression Task
##############################################
data(RoughSetData)
decision.table <- RoughSetData$housing7.dt

## using RI.hybrid.FRST for generating rules
control <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
           type.relation = c("tolerance", "eq.1"), t.implicator = "lukasiewicz")
rules <- RI.hybridFS.FRST(decision.table, control)

## in this case, we are using the same data set as the training data
res.1 <- predict(rules, decision.table[, -ncol(decision.table)])

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.