% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods_e2tree.R
\name{fitted.e2tree}
\alias{fitted.e2tree}
\title{Extract Fitted Values from an E2Tree Model}
\usage{
\method{fitted}{e2tree}(object, ...)
}
\arguments{
\item{object}{An e2tree object.}

\item{...}{Additional arguments (ignored).}
}
\value{
A vector of fitted values.
}
\description{
Returns the fitted values (predictions) for the training data used to
build the E2Tree model.
}
\examples{
\donttest{
data(iris)
smp_size <- floor(0.75 * nrow(iris))
train_ind <- sample(seq_len(nrow(iris)), size = smp_size)
training <- iris[train_ind, ]

ensemble <- randomForest::randomForest(Species ~ ., data = training,
  importance = TRUE, proximity = TRUE)
D <- createDisMatrix(ensemble, data = training, label = "Species",
  parallel = list(active = FALSE, no_cores = 1))
setting <- list(impTotal = 0.1, maxDec = 0.01, n = 2, level = 5)
tree <- e2tree(Species ~ ., training, D, ensemble, setting)

fitted(tree)
}

}
