Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the node harvest estimator
1 2 3 4 5 6 7 8 9 |
X |
A n x p - dimensional data matrix, where n is sample size and p is the dimensionality of the predictor variable. Factorial variables are currently converted to numerical variables (will be changed in the future). Missing values are supported. |
Y |
A numerical vector of length n, containing the observations of the response variable. Can be continuous (regression) or binary 0/1 (classification). |
nodesize |
Minimal number of samples in each node. |
nodes |
Number of nodes in the initial large ensemble of nodes. |
maxinter |
Maximal interaction depth (1 = only main effects; 2 = two-factor interactions etc). |
mode |
If mode is equal to |
lambda |
Optional upper bound on the inverse of the average weighted fraction of samples within each node. |
addto |
A previous node harvest estimator to which additional nodes should be attached (useful for iterative growth of the estimator when hitting memory constraints). |
onlyinter |
Allow interactions only for this list of variables. |
silent |
If |
biascorr |
Use bias correction? Experimental. Can be useful for high signal-to-noise ratio data. |
The number of nodes should be chosen as large as possible under the available computational resources.
If these resources are limited, an estimator can be build by iteratively calling the function, adding the previous
estimator via the addto
argument.
Feedback and feature requests are more than welcome (email below).
A list with entries
nodes |
A list of all selected nodes |
predicted |
Predicted values on training data |
connection |
Connectivity matrix between selected nodes (used for plotting) |
varnames |
Variable names |
Y |
The original observations |
Nicolai Meinshausen meinshausen@stats.ox.ac.uk
http://www.stats.ox.ac.uk/~meinshau
Node harvest: simple and interpretable regression and classification' (arxiv:0910.2145)
http://arxiv.org/abs/0910.2145
predict.nodeHarvest
,
plot.nodeHarvest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Load Boston Housing dataset
data(BostonHousing)
X <- BostonHousing[,1:13]
Y <- BostonHousing[,14]
## Divide data into training and test data
n <- nrow(X)
training <- sample(1:n,round(n/2))
testing <- (1:n)[-training]
## Train Node Harvest and plot and print the estimator
NH <- nodeHarvest( X[training,], Y[training], nodes=500 )
plot(NH)
print(NH, nonodes=6)
## Predict on test data and explain prediction of the first sample in the test set
predicttest <- predict(NH, X[testing,], explain=1)
plot( predicttest, Y[testing] )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.