Learn R Programming

handwriterRF (version 1.1.1)

get_ref_scores: Get Reference Scores

Description

Create reference scores of same writer and different writer scores from a dataframe of cluster fill rates.

Usage

get_ref_scores(rforest, df, seed = NULL, downsample_diff_pairs = FALSE)

Value

A list of scores

Arguments

rforest

A ranger random forest created with train_rf.

df

A dataframe of cluster fill rates created with get_cluster_fill_rates with an added writer ID column.

seed

Optional. An integer to set the seed for the random number generator to make the results reproducible.

downsample_diff_pairs

If TRUE, the different writer pairs are down-sampled to equal the number of same writer pairs. If FALSE, all different writer pairs are used.

Examples

Run this code
# \donttest{
get_ref_scores(rforest = random_forest, df = validation)
# }

Run the code above in your browser using DataLab