Hypothesis Testing Tree | R Documentation |
Fit a hypothesis testing tree.
HTT(formula, data, method, distance, controls = htt_control(...), ...)
formula |
a symbolic description of the model to be fit. |
data |
a data frame containing the variables in the model. |
method |
|
distance |
If |
controls |
a list of options that control details of the |
... |
arguments passed to |
Hypothesis testing trees examines the distribution difference over two child nodes by the binary partitioning in a hypothesis testing framework. At each split, it finds the maximum distribution difference over all possible binary partitions, the test statistic is based on generalized energy distance. The permutation test is used to estimate the p-value of the hypothesis testing.
An object of class htt
. See htt.object
.
Jiaqi Hu
htt_control
, print.htt
, plot.htt
, predict.htt
## regression
data("Boston", package = "MASS")
Bostonhtt <- HTT(medv ~ . , data = Boston, controls = htt_control(R = 99))
plot(Bostonhtt)
mean((Boston$medv - predict(Bostonhtt))^2)
## classification
irishtt <- HTT(Species ~., data = iris)
plot(irishtt)
mean(iris$Species == predict(irishtt))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.