R/classify_models.R

Defines functions classify_models

Documented in classify_models

classify_models <- function(container, models, ...) {
# helper method to make it easier to classify with models by algorithm name(s)
# output is a cbinded matrix of model predictions
# hopefully, this method can disappear after refactoring train_model
	result = NULL
	for (name in names(models)) {
		model = models[[name]]
		pred = classify_model(container, model, ...)

		if (is.null(result)) result=pred
		else result = cbind(result, pred)
	}
	
	return(result)
}

Try the RTextTools package in your browser

Any scripts or data that you put into this service are public.

RTextTools documentation built on April 26, 2020, 9:05 a.m.