compare_results: Compare two result files to find similar signatures

View source: R/compare_results.R

compare_resultsR Documentation

Compare two result files to find similar signatures

Description

Compare two result files to find similar signatures

Usage

compare_results(
  musica,
  model_id,
  other_model_id,
  modality = "SBS96",
  result_name = "result",
  other_musica = NULL,
  other_result_name = "result",
  threshold = 0.9,
  metric = "cosine",
  result_rename = deparse(substitute(model_id)),
  other_result_rename = deparse(substitute(other_model_id)),
  decimals = 2,
  same_scale = FALSE
)

Arguments

musica

A musica object.

model_id

The name of the first model to compare.

other_model_id

The name of the second model to compare.

modality

Modality of results being compared. Default "SBS96".

result_name

Name of the result list entry for the first result to compare. Default "result".

other_musica

A second musica object. If null, the provided musica object is used twice. Default NULL.

other_result_name

Name of the result list entry for the second result to compare. Default "result".

threshold

threshold for similarity

metric

One of "cosine" for cosine similarity or "jsd" for 1 minus the Jensen-Shannon Divergence. Default "cosine".

result_rename

title for plot of first result signatures

other_result_rename

title for plot of second result signatures

decimals

Specifies rounding for similarity metric displayed. Default 2.

same_scale

If TRUE, the scale of the probability for each signature will be the same. If FALSE, then the scale of the y-axis will be adjusted for each signature. Default FALSE.

Value

Returns the comparisons

Examples

data(res)
compare_results(res,
  model_id = "res", other_model_id = "res",
  modality = "SBS96", threshold = 0.8
)

campbio/musicatk documentation built on Dec. 25, 2024, 9:34 p.m.