plot_scores | R Documentation |
Plot same writer and different writers reference similarity scores from a
validation set. The similarity scores are greater than or equal to zero and
less than or equal to one. The interval from 0 to 1 is split into n_bins
.
The proportion of scores in each bin is calculated and plotted. Optionally, a
vertical dotted line may be plotted at an observed similarity score.
plot_scores(scores, obs_score = NULL, n_bins = 50)
scores |
A dataframe of scores calculated with
|
obs_score |
Optional. A similarity score calculated with
|
n_bins |
The number of bins |
The methods used in this package typically produce many times more different
writer scores than same writer scores. For example, ref_scores
contains
79,600 different writer scores but only 200 same writer scores. Histograms,
which show the frequency of scores, don't handle this class imbalance well.
Instead, the rate of scores is plotted.
A ggplot2 plot of histograms
plot_scores(scores = ref_scores)
plot_scores(scores = ref_scores, n_bins = 70)
# Add a vertical line 0.1 on the horizontal axis.
plot_scores(scores = ref_scores, obs_score = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.