Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 percentiles #17

Merged
merged 4 commits into from
Nov 6, 2024
Merged

16 percentiles #17

merged 4 commits into from
Nov 6, 2024

Conversation

stephaniereinders
Copy link
Member

Pull request to get the changes to random_forest implemented on 16-percentiles branch. random_forest was changed to store the scores instead of the densities.

Previously, random_forest was a list that contained (1) distances, (2) a ranger random forest object, and (3) densities fit to similarity scores.

Because we want to plot the similarity scores themselves and not the densities fit with KDE, I replaced the densities in random_forest with the scores. Now `train_rf()` returns a list of (1) distances, (2) a ranger random forest object, and (3) scores.

The densities are only used to create SLRs so I updated `calculate_slr()` to fit the densities, instead of taking the pre-fit densities as input with the random forest.

The densities are no longer available to users as a data object. If the user wants the densities, they can run `make_densities_from_rf(scores = rforest$scores)`.

The densities are saved as a test fixture and used to test `make_densities_from_rf()`.
The user might want to plot the reference scores without placing a vertical line at a particular score, so I changed the default for `score` to NULL. Now a vertical line is only plotted if `score` is not NULL.
Instead of returning an SLR, `calculate_percent_rank()` returns the percentile of the observed score within the same writer and different writer distributions.
@stephaniereinders stephaniereinders linked an issue Nov 6, 2024 that may be closed by this pull request
4 tasks
@stephaniereinders stephaniereinders merged commit cf04392 into main Nov 6, 2024
@stephaniereinders stephaniereinders deleted the 16-percentiles branch November 6, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Present the results in terms of typicality
1 participant