Skip to content

Add trace_plot() for visualizing parameter evolution over timepoints#60

Merged
osorensen merged 8 commits intomainfrom
copilot/create-trace-plot-functions
Jan 22, 2026
Merged

Add trace_plot() for visualizing parameter evolution over timepoints#60
osorensen merged 8 commits intomainfrom
copilot/create-trace-plot-functions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 22, 2026

Implementation Plan for Trace Plotting Functions

  • Explore repository structure and understand data format
  • Create trace_plot() function for alpha and tau parameters
  • Add input validation (check if trace=TRUE was used)
  • Support single cluster and mixture models
  • Add proper documentation with roxygen2
  • Export the function in NAMESPACE (regenerate with roxygen2)
  • Create tests for the new function (all 13 tests pass)
  • Build and test the package
  • Verify functionality with example data
  • Create manual verification examples with visual outputs
  • Code review completed (4 minor nitpicks, all acceptable)
  • Security checks passed (no vulnerabilities found)
  • Clean up temporary files
  • Use Rdpack for references instead of hard-coding citation
  • Remove tau example from documentation (keep only alpha)

Summary

Successfully implemented trace_plot() function for visualizing the timeseries dynamics of alpha and tau parameters.

Recent Changes (addressing PR feedback):

  • Added Rdpack as dependency in DESCRIPTION (Imports and RdMacros)
  • Updated documentation to use \insertRef{10.1214/25-BA1564}{BayesMallowsSMC2} instead of hard-coded "Sørensen (2025)"
  • Removed tau example from documentation, keeping only alpha example
  • Updated man/trace_plot.Rd with proper references section

Features:

✓ Trace plots for alpha and tau parameters
✓ Weighted mean line with 95% credible intervals
✓ Support for single cluster and mixture models
✓ Comprehensive error handling and validation
✓ Full test coverage (13 tests passing)
✓ Proper bibliographic references via Rdpack

Original prompt

This section details on the original issue you should resolve

<issue_title>Create trace plotting functions</issue_title>
<issue_description>Should visualize the timeseries dynamics.</issue_description>

Comments on the Issue (you are @copilot in this section)

@osorensen Make a function for creating trace plots of alpha and tau, similar to Figure 4 (left) in the attached paper. This function will only work when trace=TRUE in compute sequentially. It should take objects of class BayesMallowsSMC2, but I don't think it need to be generic. A possible name could just be trace_plot(). Don't include functionality for plotting the rankings rho yet.

Download.pdf</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 22, 2026 09:39
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
… models

Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add trace plotting function for time series dynamics Add trace_plot() for visualizing parameter evolution over timepoints Jan 22, 2026
Copilot AI requested a review from osorensen January 22, 2026 10:00
Copy link
Copy Markdown
Owner

@osorensen osorensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use Rdpack to handle references, rather than hard-coding Sørensen (2025) in the documentation. References are in inst/REFERENCES.bib. The Rdpack package provides the functionality.
  • Don't include trace plot of tau in the example. Only alpha.

Comment thread R/trace_plot.R
#' Create Trace Plots for BayesMallowsSMC2 Objects
#'
#' Visualize the timeseries dynamics of the alpha and tau parameters across
#' timepoints. This function creates trace plots similar to Figure 4 (left) in
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use Rdpack to handle references, rather than hard-coding Sørensen (2025) in the documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in fcee400. Added Rdpack to DESCRIPTION (Imports and RdMacros) and replaced hard-coded citation with \insertRef{10.1214/25-BA1564}{BayesMallowsSMC2} in both the description and references section.

…mentation

Co-authored-by: osorensen <21175639+osorensen@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 22, 2026

  • Use Rdpack to handle references, rather than hard-coding Sørensen (2025) in the documentation. References are in inst/REFERENCES.bib. The Rdpack package provides the functionality.
  • Don't include...

Done in fcee400. Added Rdpack support and removed the tau example from documentation, keeping only the alpha example as requested.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.r-project.org
    • Triggering command: /usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e install.packages(c(&#39;roxygen2&#39;,~&#43;~&#39;Rdpack&#39;),~&#43;~repos=&#39;REDACTED&#39;,~&#43;~lib=&#39;~/R/library&#39;,~&#43;~quiet=TRUE) (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from osorensen January 22, 2026 10:42
@osorensen osorensen marked this pull request as ready for review January 22, 2026 10:42
@osorensen osorensen merged commit 7214c99 into main Jan 22, 2026
5 checks passed
@osorensen osorensen deleted the copilot/create-trace-plot-functions branch January 22, 2026 10:52
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.

Create trace plotting functions

2 participants