trainMOA.MOA_classifier | R Documentation |
Train a MOA classifier (e.g. a HoeffdingTree) on a datastream
## S3 method for class 'MOA_classifier' trainMOA(model, formula, data, subset, na.action = na.exclude, transFUN = identity, chunksize = 1000, reset = TRUE, trace = FALSE, options = list(maxruntime = +Inf), ...)
model |
an object of class |
formula |
a symbolic description of the model to be fit. |
data |
an object of class |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain |
transFUN |
a function which is used after obtaining |
chunksize |
the number of rows to obtain from the |
reset |
logical indicating to reset the |
trace |
logical, indicating to show information on how many datastream chunks are already processed
as a |
options |
a names list of further options. Currently not used. |
... |
other arguments, currently not used yet |
An object of class MOA_trainedmodel which is a list with elements
model: the updated supplied model
object of class MOA_classifier
call: the matched call
na.action: the value of na.action
terms: the terms
in the model
transFUN: the transFUN argument
MOA_classifier
, datastream_file
, datastream_dataframe
,
datastream_matrix
, datastream_ffdf
, datastream
,
predict.MOA_trainedmodel
hdt <- HoeffdingTree(numericEstimator = "GaussianNumericAttributeClassObserver") hdt data(iris) iris <- factorise(iris) irisdatastream <- datastream_dataframe(data=iris) irisdatastream$get_points(3) mymodel <- trainMOA(model = hdt, Species ~ Sepal.Length + Sepal.Width + Petal.Length, data = irisdatastream, chunksize = 10) mymodel$model irisdatastream$reset() mymodel <- trainMOA(model = hdt, Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Length^2, data = irisdatastream, chunksize = 10, reset=TRUE, trace=TRUE) mymodel$model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.