Description Usage Arguments Details Value See Also Examples
A function for calculating F_1 scores based on SVM evaluations
1 | Fscores_maker(actual, pred)
|
data |
Data frame containing the actual and predicted values of the property under consideration |
actual |
Character string of the column name of the the actual values of the property under consideration |
pred |
Character string of the column name of the the predicted values of the property under consideration.
Must be same length as |
parties |
Logical vector specifying if |
The F-scores are calculated as a product of true positives (TP), false negatives (FN), and false positives (FP).
Precision:
P = TP / (TP + FP)
Recall:
R = TP / (TP + FN)
F-score:
F = 2 * ((P * R) / (P + R))
Returns a list with a data frame of F-scores, precision, and recall for each class, macro averaged F-score, and accuracy.
Other fscores: Fscores_boot
1 2 | data(tonDemo)
Fscores_maker(tonDemo, "party_id", "class_token")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.