Forward-propagate given data through the deep neural network.
# S3 method for DArch
predict(object, ..., newdata = NULL, type = "raw",
inputLayer = 1, outputLayer = 0)
Further parameters, if newdata
is NULL
, the first
unnamed parameter will be used for newdata
instead.
New data to predict, NULL
to return latest network
output
Output type, one of: raw
, bin
, class
, or
character
. raw
returns the layer output, bin
returns
1
for every layer output >0.5
, 0
otherwise, and
class
returns 1
for the output unit with the highest
activation, otherwise 0
. Additionally, when using class
,
class labels are returned when available. character
is the same as
class
, except using character vectors instead of factors.
Layer number (> 0
). The data given in
newdata
will be fed into this layer.
Note that absolute numbers count from the input layer, i.e. for
a network with three layers, 1
would indicate the input layer.
Layer number (if > 0
) or offset (if <= 0
)
relative to the last layer. The output of the given layer is returned.
Note that absolute numbers count from the input layer, i.e. for
a network with three layers, 1
would indicate the input layer.
Vector or matrix of networks outputs, output type depending on the
type
parameter.
Other darch interface functions: darchBench
,
darchTest
, darch
,
plot.DArch
, print.DArch
# NOT RUN {
data(iris)
model <- darch(Species ~ ., iris, retainData = T)
predict(model)
# }
Run the code above in your browser using DataLab