Learn R Programming

fdm2id (version 0.9.6)

cartleafs: Number of Leafs

Description

Return the number of leafs of a decision tree.

Usage

cartleafs(model)

Value

The number of leafs.

Arguments

model

The decision tree.

See Also

CART, cartdepth, cartinfo, cartnodes, cartplot

Examples

Run this code
require (datasets)
data (iris)
model = CART (iris [, -5], iris [, 5])
cartleafs (model)

Run the code above in your browser using DataLab