Description Usage Arguments Author(s) References See Also Examples
This is a function which adds labels to the plot generated by plot.dt.madlib
.
1 2 3 4 |
x |
The fitted tree from the result of |
splits |
A boolean, if TRUE, labels the splits with the criterion for the split. |
label |
This is currently ignored. |
FUN |
The name of a labeling function, e.g. text |
all |
A boolean, if TRUE, labels all the nodes, otherwise just the terminal nodes. |
pretty |
An alternative to the |
digits |
Number of significant digits to include in numeric labels. |
use.n |
A boolean, if TRUE, adds to label (\#events level1/ \#events level2/etc. for classification and n for regression) |
fancy |
A boolean, if TRUE, represents internal nodes by ellipses and leaves by rectangles. |
fwidth |
Controls the width of the ellipses and rectangles if fancy=TRUE. |
fheight |
Controls the height of the ellipses and rectangles if fancy=TRUE. |
bg |
The color used to paint the background if fancy=TRUE. |
minlength |
The length to use for factor labels. |
... |
Other graphical parameters to be supplied as input to this function (see |
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
[1] Documentation of decision tree in MADlib 1.6, https://madlib.apache.org/docs/latest/
madlib.rpart
is the wrapper for MADlib's tree_train function for decision trees.
plot.dt.madlib
, print.dt.madlib
are visualization functions
for a model fitted through madlib.rpart
predict.dt.madlib
is a wrapper for MADlib's predict function for
decision trees.
madlib.lm
, madlib.glm
,
madlib.summary
, madlib.arima
, madlib.elnet
are all MADlib wrapper functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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)
key(x) <- "id"
fit <- madlib.rpart(rings < 10 ~ length + diameter + height + whole + shell,
data=x, parms = list(split='gini'), control = list(cp=0.005))
plot(fit, uniform=TRUE)
text(fit, use.n=TRUE, all=TRUE)
db.disconnect(cid)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.