predict.DFNET.forest | R Documentation |
Uses a DFNET.forest
to run predictions on data.
## S3 method for class 'DFNET.forest' predict(object, data, ...)
object |
The |
data |
matrix or 3D array. The data to run predictions on. |
... |
arguments to be passed to or from other methods. |
A list with members
the predicted classes
the relative number of decision trees that predicted the given class.
the relative number of decision trees that voted
at all (i.e. did not predict NaN
or NA
)
.
## Not run: smp_size <- floor(0.80 * dim(features)[1]) train_ids <- sample(dim(features)[1], size = smp_size) test_ids <- (1:dim(features)[1])[-train_ids] forest <- DFNET_init(graph, features[train_ids, ]) # train ... prediction <- predict(forest, features[test_ids, ]) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.