print.dt.madlib {PivotalR} | R Documentation

## Print the result of madlib.rpart

### Description

This function prints the result of `madlib.rpart` to the screen. It internally calls R's `print.rpart` function.

### Usage

        ## S3 method for class 'dt.madlib'
    print(x, digits = max(3L, getOption("digits") - 3L),
            ...)

### Arguments

`x` | The fitted tree from the result of `madlib.rpart`
`digits` | The number of digits to print for numerical values.
`...` | Arguments to be passed to or from other methods.

### Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io

### References

[1] Documentation of decision tree in MADlib 1.6, http://doc.madlib.net/latest/

### See Also

`madlib.rpart` is the wrapper for MADlib's tree_train function for decision trees. `plot.dt.madlib`, `text.dt.madlib` are other visualization functions.

`madlib.lm`, `madlib.glm`, `madlib.rpart`, `madlib.summary`, `madlib.arima`, `madlib.elnet` are all MADlib wrapper functions.

### Examples

    ## Not run:

    ## set up the database connection
    ## Assume that .port is port number and .dbname is the database name
    cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE)

    x <- as.db.data.frame(abalone, conn.id = cid, verbose = FALSE)
    lk(x, 10)

    ## decision tree using abalone data, using default values of minsplit,
    ## maxdepth etc.
    key(x)<-"id"
    fit <- madlib.rpart(rings < 10 ~ length + diameter + height + whole + shell,
           data=x, parms = list(split='gini'), control = list(cp=0.005))

    print(fit)

    db.disconnect(cid)

    ## End(Not run)

[Package PivotalR version 0.1.18.3.1 Index]