predict_rating: Predict whether a Yelp review is positive or negative.

Description Usage Arguments Value

View source: R/predict.R

Description

Predict whether a Yelp review is positive or negative.

Usage

1
predict_rating(data, threshold = 0.5)

Arguments

data

A tibble of Yelp reviews pre-processed with prepare_yelp() and scored with get_prob().

threshold

An optional threshold. Default is 0.5 which provided the best accuracy in testing.

Value

The input data with a new column containing a predicted rating of "POS" or "NEG" for each review.


chris31415926535/yelpredict documentation built on Jan. 7, 2021, 9:34 p.m.