RMOA allows to interface R with MOA (http://moa.cms.waikato.ac.nz/).
RMOA interfaces with MOA version 2014.04. Documentation of MOA directed towards RMOA users can be found at http://jwijffels.github.io/RMOA/
Currently RMOA focusses on classification models (as the stream package in R already allows clustering). Classification models which are possible through RMOA are:
Streaming regression models are also included namely
Streaming recommendation engines which are made available are
The package is currently available at CRAN.
To install the latest development version from github
library(devtools)
install.packages("ff")
install.packages("rJava")
install_github("jwijffels/RMOA", subdir="RMOAjars/pkg")
install_github("jwijffels/RMOA", subdir="RMOA/pkg")
Examples below show how to construct, train and score using a HoeffdingTree and boosted ensemble of HoeffdingTree.
require(RMOA) ## Create a HoeffdingTree hdt <- HoeffdingTree(numericEstimator = "GaussianNumericAttributeClassObserver") hdt ## Define a stream - e.g. a stream based on a data.frame data(iris) iris <- factorise(iris) irisdatastream <- datastream_dataframe(data=iris) ## Train the HoeffdingTree on the iris dataset mymodel <- trainMOA(model = hdt, formula = Species ~ Sepal.Length + Sepal.Width + Petal.Length, data = irisdatastream) ## Predict using the HoeffdingTree on the iris dataset scores <- predict(mymodel, newdata=iris, type="response") str(scores) table(scores, iris$Species) scores <- predict(mymodel, newdata=iris, type="votes") head(scores) ## ## Boosting example ## irisdatastream$reset() mymodel <- OzaBoost(baseLearner = "trees.HoeffdingTree", ensembleSize = 30) mymodel <- trainMOA(model = mymodel, formula = Species ~ Sepal.Length + Sepal.Width + Petal.Length, data = irisdatastream) ## Predict using the HoeffdingTree on the iris dataset scores <- predict(mymodel, newdata=iris, type="response") str(scores) table(scores, iris$Species) scores <- predict(mymodel, newdata=iris, type="votes") head(scores) ## ## Streaming regressions and streaming recommendation engines. Examples can be found in the documentation ## ?trainMOA.MOA_regressor ?trainMOA.MOA_recommender
Data streams are implemented for classic data in R (data.frame, matrix), data in files (csv, delimited, flat table) as well as out-of memory data in an ffdf (ff package).
Currently the following MOA models are not (yet) implemented in RMOA.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4