R: The predicting function for rule induction methods based on...

predict.RuleSetFRST {RoughSets} | R Documentation

## The predicting function for rule induction methods based on FRST

### 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

    ## 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

    ##############################################
    ## 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)])

[Package RoughSets version 1.3-7 Index]