Learn R Programming

RMOA (version 1.1.0)

MOA_regressor: Create a MOA regressor

Description

Create a MOA regressor

Usage

MOA_regressor(model, control = NULL, ...)

Value

An object of class MOA_regressor

Arguments

model

character string with a model. E.g. AMRulesRegressor, FadingTargetMean, FIMTDD, ORTO, Perceptron, RandomRules, SGD, TargetMean, ... The list of known models can be obtained by typing RMOA:::.moaknownmodels. See the examples and MOAoptions.

control

an object of class MOAmodelOptions as obtained by calling MOAoptions

...

options of parameters passed on to MOAoptions, in case control is left to NULL. Ignored if control is supplied

See Also

MOAoptions

Examples

Run this code
mymodel <- MOA_regressor(model = "FIMTDD")
mymodel
data(iris)
iris <- factorise(iris)
irisdatastream <- datastream_dataframe(data=iris)
## Train the model
mytrainedmodel <- trainMOA(model = mymodel, 
 Sepal.Length ~ Petal.Length + Species, data = irisdatastream)
mytrainedmodel$model

summary(lm(Sepal.Length ~ Petal.Length + Species, data = iris))
predict(mytrainedmodel, newdata=iris)

Run the code above in your browser using DataLab