validate_model: Assert that model makes sensible predictions

Description Usage Arguments Value

View source: R/validate-model.R

Description

This function tests model predictions against a small sample of inputs with predictable outputs. For example, a sentiment analysis model that returns a sentiment of "bad" for "love" should not be used. We can also demand a minimum level of accuracy according to one or more metrics. Any failed assertions will raise an error. This validation approach could also be used to perform rudimentary checks for model bias (in the ethics sense).

Usage

1
validate_model(random_forest, vectoriser, tfidf = NULL)

Arguments

random_forest

A model created with the randomForest package.

vectoriser

A vectoriser constructed with the text2vec package.

tfidf

A tfidf object constructed with the text2vec package. If no tfidf is NULL, then weighting will not be applied.

Value

The MD5 hash of the random_forest object


mdneuzerling/DrakeModelling documentation built on June 26, 2020, 1:25 p.m.