Description Usage Arguments Details Value Examples
View source: R/assess_models.R
This function is deprecated; all dependent functions (e.g. plot_roc()
or plot_predictor_words
) now take individual models as arguments. This function assesses one or more models created by the language_model
function.
1 |
... |
Models generated by the |
The primary purpose of this function is to be used with other functions included in this package, such as plot_roc() or predictor_word_plots()
All necessary calculations are performed by this function, so output plots and analyses can be performed quickly and modified as needed
This function can be used to assess models generated by the language_model
, as well as simple predictors that could be compared with language models.
An object of the type "modelAssessment"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
strong_movie_review_data$cleanText = clean_text(strong_movie_review_data$text)
mild_movie_review_data$cleanText = clean_text(mild_movie_review_data$text)
# Using language to predict "Positive" vs. "Negative" reviews
# Only for strong reviews (ratings of 1 or 10)
movie_model_strong = language_model(strong_movie_review_data,
outcomeVariableColumnName = "valence",
outcomeVariableType = "binary",
textColumnName = "cleanText")
# Using language to predict "Positive" vs. "Negative" reviews
# Only for mild reviews (ratings of 4 or 7)
movie_model_mild = language_model(mild_movie_review_data,
outcomeVariableColumnName = "valence",
outcomeVariableType = "binary",
textColumnName = "cleanText")
# Create the model assessment
# movie_assessment = assess_models(movie_model_strong, movie_model_mild)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.