partykit (version 1.0-5)

party-coercion: Coercion Functions

Description

Functions coercing various objects to objects of class party.

Usage

as.party(obj, ...) "as.party"(obj, ...) "as.party"(obj, ...) "as.party"(obj, ...) pmmlTreeModel(file, ...) as.constparty(obj, ...) as.simpleparty(obj, ...) "as.simpleparty"(obj, ...) "as.simpleparty"(obj, ...) "as.simpleparty"(obj, ...) "as.simpleparty"(obj, ...)

Arguments

obj
an object of class rpart, Weka_tree, XMLnode or objects inheriting from party.
file
a file name of a XML file containing a PMML description of a tree.
...
additional arguments.

Value

All methods return objects of class party.

Details

Trees fitted using functions rpart or J48 are coerced to party objects. By default, objects of class constparty are returned.

When information about the learning sample is available, party objects can be coerced to objects of class constparty or simpleparty (see party for details).

Examples

Run this code
## fit tree using rpart
library("rpart")
rp <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)

## coerce to `constparty'
as.party(rp)

Run the code above in your browser using DataLab