frbsPMML: The frbsPMML generator

Description Usage Arguments Details Value References Examples

View source: R/pmml.frbs.R

Description

It is the main function used for generating the frbsPMML format. In this package, we provide interfaces for writing and reading frbsPMML to/from a text file. See write.frbsPMML and read.frbsPMML.

Usage

1
2
3
frbsPMML(model, model.name = "frbs_model", app.name = "frbs",
  description = NULL, copyright = NULL,
  algorithm.name = model$method.type, ...)

Arguments

model

an frbs model.

model.name

a string representing the model name.

app.name

a string representing an application name.

description

a string representing the simulation description.

copyright

a copyright of simulation.

algorithm.name

a string representing the algorithm name.

...

other parameters

Details

frbsPMML is a universal framework for representing FRBS models, which is a format adopted from the Predictive Model Markup Language (PMML). PMML is a format constructed by an XML-based language to provide a standard for describing models produced by data mining and machine learning algorithms. A main contribution of PMML is to provide interoperable schemata of predictive models. Using PMML, we can easily perform these tasks as our models are documented in an XML-based language. Human experts can also update and modify the model on the files directly.

Since PMML is an XML-based language, the specification is defined by an XML Schema as recommended by the World Wide Web Consortium (W3C). The PMML format is specified by the main tag PMML that contains some components. In the following, we describe the main components:

Besides these components, there are some optional elements, such as MiningBuildTask, TransformationDictionary, and Extension. More detailed information about PMML can be found in (Guazzelli et al., 2009).

Three models, which can be used for handling regression and classification tasks, are specified by the proposed representations: Mamdani, Takagi Sugeno Kang, and fuzzy rule-based classification systems. There are the following benefits offered by frbsPMML, as follows:

Value

FRBS model in frbsPMML format

References

A. Guazzelli, M. Zeller, W.C. Lin, and G. Williams., "pmml: An open standard for sharing models", The R Journal, Vol. 1, No. 1, pp. 60-65 (2009).

Data Mining Group, http://www.dmg.org/.

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
## This example shows how to construct a frbsPMML file of the frbs model
## Even though we are using MAMDANI model, other models have the same way
##
## 1. Produce frbs model, for example: we perform Wang & Mendel's technique (WM)
## Input data
## Not run: data(frbsData)
data.train <- frbsData$GasFurnance.dt[1 : 204, ]
data.fit <- data.train[, 1 : 2]
data.tst <- frbsData$GasFurnance.dt[205 : 292, 1 : 2]
real.val <- matrix(frbsData$GasFurnance.dt[205 : 292, 3], ncol = 1)
range.data <- matrix(c(-2.716, 2.834, 45.6, 60.5, 45.6, 60.5), nrow = 2)

## Set the method and its parameters
method.type <- "WM"
control <- list(num.labels = 3, type.mf = "GAUSSIAN", type.defuz = "WAM",
                type.tnorm = "MIN", type.implication.func = "ZADEH",
                name = "sim-0")

## Generate fuzzy model
object <- frbs.learn(data.train, range.data, method.type, control)

## 2. Write frbsPMML file
## by calling frbsPMML(), the frbsPMML format will be displayed in R console
frbsPMML(object)
## End(Not run)

frbs documentation built on May 29, 2017, 9:08 p.m.

Search within the frbs package
Search all R packages, documentation and source code