Skip to content

Simplify quickstart tutorial by removing redundant diagnostic sections#328

Closed
Copilot wants to merge 6 commits intomainfrom
copilot/simplify-quickstart-guide
Closed

Simplify quickstart tutorial by removing redundant diagnostic sections#328
Copilot wants to merge 6 commits intomainfrom
copilot/simplify-quickstart-guide

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Simplify quickstart documentation

  • Remove "Diagnostics for comparing distributions" section (cells 29-30)
  • Update "Distribution diagnostics (EMD/CVMD/KS)" section title to include "KLD" (cell 27)
  • Remove "Compare ASMD (Absolute Standardized Mean Difference)" section (cells 67-68) from "Comparing Adjustment Methods"
  • Fix capitalization of KLD to match other diagnostic abbreviations (EMD, CVMD, KS)
  • Add KLD description to distribution diagnostics section
  • Add kld() code example to distribution diagnostics section
  • Include note about raw covariates applying to all diagnostics
  • Clarify KLD is a divergence measure (not symmetric distance)
  • Remove trailing empty strings from cells
  • Run code review and address all feedback
  • Run security checks
  • Reply to all review comments

Summary

Successfully simplified the quickstart tutorial by consolidating distribution diagnostics and addressing all review feedback:

Changes Made:

  1. Removed redundant sections (4 cells removed):

    • "Diagnostics for comparing distributions" section (cells 29-30)
    • "Compare ASMD" section from "Comparing Adjustment Methods" (cells 67-68)
  2. Enhanced distribution diagnostics section:

    • Added KLD to section header: "Distribution diagnostics (KLD/EMD/CVMD/KS)"
    • Added KLD description with clarification that it's a divergence measure (non-symmetric)
    • Added print(sample_with_target.covars().kld().T) code example
    • Moved note about raw covariates to separate paragraph applying to all diagnostics
    • Removed trailing empty strings for cleaner notebook formatting
  3. Code review feedback addressed:

    • Separated note about raw covariates from KLD bullet to apply to all metrics
    • Clarified KLD is a divergence measure vs distance metric
    • Cleaned up formatting issues

Result: Cleaner tutorial flow with 4 cells removed (75 → 71), all essential information preserved and better organized.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Simplify quick start further</issue_title>
<issue_description>Fix this:
https://import-balance.org/docs/tutorials/quickstart/

Remove the section
'Diagnostics for comparing distributions'
But add the the previous section kld:
"Distribution diagnostics (EMD/CVMD/KS)"

And remove the section
"Compare ASMD (Absolute Standardized Mean Difference)"
From the section "Comparing Adjustment Methods"
</issue_description>

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 8, 2026 17:24
Co-authored-by: talgalili <976006+talgalili@users.noreply.github.com>
Co-authored-by: talgalili <976006+talgalili@users.noreply.github.com>
Copilot AI changed the title [WIP] Simplify quick start documentation as per issue Simplify quickstart tutorial by removing redundant diagnostic sections Feb 8, 2026
Copilot AI requested a review from talgalili February 8, 2026 17:26
@talgalili talgalili marked this pull request as ready for review February 8, 2026 18:08
Copilot AI review requested due to automatic review settings February 8, 2026 18:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Simplifies the balance quickstart tutorial notebook by removing redundant diagnostic content, aiming to streamline the documentation flow for distribution diagnostics and adjustment-method comparison.

Changes:

  • Updated the distribution diagnostics section header to include KLD and removed the standalone “Diagnostics for comparing distributions” section.
  • Removed the “Compare ASMD” section under “Comparing Adjustment Methods” to avoid duplicating information already present in summaries.

"\n",
"These diagnostics complement **ASMD**, which only compares means. Use EMD/CVMD/KS when you want to check whether weighting aligns the *shape* of covariate distributions (not just their means).\n"
"These diagnostics complement **ASMD**, which only compares means. Use EMD/CVMD/KS when you want to check whether weighting aligns the *shape* of covariate distributions (not just their means).\n",
""
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

There is an extra empty string entry at the end of the markdown cell source. Consider removing it (or replacing with a newline string if a trailing blank line is intended) to avoid unnecessary notebook diffs/noise and potential formatting quirks in renderers.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed trailing empty strings from both markdown and code cells. Commit: 69ecbca

@talgalili
Copy link
Contributor

@copilot

You also need to add

"print(sample_with_target.covars().kld().T)\n

And the sentence you removed about asmd not working on the raw catgorical columns can be moved up there as well

Copilot AI and others added 2 commits February 8, 2026 18:14
Co-authored-by: talgalili <976006+talgalili@users.noreply.github.com>
Co-authored-by: talgalili <976006+talgalili@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot

You also need to add
...

Added print(sample_with_target.covars().kld().T) to the code cell and moved the note about distribution diagnostics operating on raw covariates (not model matrix) to a separate paragraph that applies to all diagnostics. Commits: 69ecbca, 2760edc

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@meta-codesync
Copy link

meta-codesync bot commented Feb 8, 2026

@talgalili has imported this pull request. If you are a Meta employee, you can view this in D92658641.

@meta-codesync
Copy link

meta-codesync bot commented Feb 9, 2026

@talgalili merged this pull request in 1e4e9f5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Simplify quick start further

4 participants