R/train_models.R

Defines functions train_models

Documented in train_models

train_models <- function(container, algorithms, ...) {
# helper method to make it easier to train models by algorithm name(s)
# output is a list(algorithm_name=model, ..) 
# hopefully, this method can disappear after refactoring train_model
	result = list()
	for (algorithm in algorithms) {
		model = train_model(container, algorithm, ...)
		result[[algorithm]] = model
	}
	
	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.